/**
* Tell controller that we're ready to accept switches loop.
*/
public void run() {
try {
final ServerBootstrap bootstrap = createServerBootStrap();
bootstrap.setOption("reuseAddr", true);
bootstrap.setOption("child.keepAlive", true);
bootstrap.setOption("child.tcpNoDelay", true);
bootstrap.setOption("child.sendBufferSize", Controller.SEND_BUFFER_SIZE);
ChannelPipelineFactory pfact =
new OpenflowPipelineFactory(this, null, sslContext);
bootstrap.setPipelineFactory(pfact);
cg = new DefaultChannelGroup();
openFlowPorts.forEach(port -> {
InetSocketAddress sa = new InetSocketAddress(port);
cg.add(bootstrap.bind(sa));
log.info("Listening for switch connections on {}", sa);
});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Controller.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:athena
作者:
评论列表
文章目录