DatagramBulkClient.java 文件源码

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

项目:netcrusher-java 作者:
public DatagramBulkClient(String name,
                          InetSocketAddress bindAddress,
                          InetSocketAddress connectAddress,
                          long limit,
                          CyclicBarrier readBarrier,
                          CyclicBarrier sentBarrier) throws IOException
{
    this.channel = DatagramChannel.open(StandardProtocolFamily.INET);
    this.channel.configureBlocking(true);
    this.channel.bind(bindAddress);

    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("Bulk client {}: BIND<{}> CONNECT<{}>",
            new Object[]{name, bindAddress, connectAddress});
    }

    this.consumer = new Consumer(channel, name, limit, connectAddress, readBarrier);
    this.producer = new Producer(channel, name, limit, connectAddress, sentBarrier);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号