| Constructor and Description |
|---|
UdpBootstrap(Protocol<Request> protocol,
Message<Request> messageProcessor) |
| Modifier and Type | Method and Description |
|---|---|
UdpChannel<Request> |
open()
开启一个UDP通道,端口号随机
|
UdpChannel<Request> |
open(int port)
开启一个UDP通道
|
UdpChannel<Request> |
open(String host,
int port)
开启一个UDP通道
|
void |
run() |
UdpBootstrap<Request> |
setReadBufferSize(int size)
设置读缓存区大小
|
UdpBootstrap<Request> |
setThreadNum(int num)
设置线程大小
|
void |
shutdown() |
public UdpChannel<Request> open() throws IOException
IOException - 异常public UdpChannel<Request> open(int port) throws IOException
port - 指定绑定端口号,为0则随机指定IOException - 异常public UdpChannel<Request> open(String host, int port) throws IOException
host - 绑定本机地址port - 指定绑定端口号,为0则随机指定IOException - 异常public void shutdown()
public final UdpBootstrap<Request> setReadBufferSize(int size)
size - 单位:bytepublic final UdpBootstrap<Request> setThreadNum(int num)
num - 线程大小Copyright © 2019. All rights reserved.