public class ChannelUtil extends Object
Constructor and Description |
---|
ChannelUtil() |
Modifier and Type | Method and Description |
---|---|
static AsynchronousSocketChannel |
connect(AsynchronousChannelGroup group,
InetSocketAddress address)
连接到指定地址
|
static AsynchronousChannelGroup |
createFixedGroup(int poolSize)
|
public static AsynchronousChannelGroup createFixedGroup(int poolSize)
poolSize
- 线程池大小AsynchronousChannelGroup
public static AsynchronousSocketChannel connect(AsynchronousChannelGroup group, InetSocketAddress address)
group
- AsynchronousChannelGroup
address
- 地址信息,包括地址和端口AsynchronousSocketChannel
Copyright © 2024. All rights reserved.