BasicMulticastSocketHandler.java 文件源码

java
阅读 17 收藏 0 点赞 0 评论 0

项目:wot_gateways 作者:
public BasicMulticastSocketHandler(ChannelManager channelManager)
        throws IOException {
    this.channelManager = channelManager;
    mcastChannel = DatagramChannel.open(StandardProtocolFamily.INET);
    mcastChannel.socket().bind(new InetSocketAddress(0)); // port can be 0,
                                                            // then a free
                                                            // port is
                                                            // chosen
    this.localPort = mcastChannel.socket().getLocalPort();
    mcastChannel.configureBlocking(false);

    workerThread = new WorkerThread();
    workerThread.start();

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号