|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
public interface DatagramChannelConfig
DatagramChannel
的ChannelConfig
.
ChannelConfig
还提供其他的属性,DatagramChannelConfig
有以下属性:
名称 | 关联setter方法 |
---|---|
"broadcast" |
setBroadcast(boolean) |
"interface" |
setInterface(InetAddress) |
"loopbackModeDisabled" |
setLoopbackModeDisabled(boolean) |
"networkInterface" |
setNetworkInterface(NetworkInterface) |
"reuseAddress" |
setReuseAddress(boolean) |
"receiveBufferSize" |
setReceiveBufferSize(int) |
"receiveBufferSizePredictor" |
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor) |
"receiveBufferSizePredictorFactory" |
setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory)
|
"sendBufferSize" |
setSendBufferSize(int) |
"timeToLive" |
setTimeToLive(int) |
"trafficClass" |
setTrafficClass(int) |
从接口 org.jboss.netty.channel.ChannelConfig 继承的方法 |
---|
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory |
方法详细信息 |
---|
int getSendBufferSize()
SO_SNDBUF
属性.
void setSendBufferSize(int sendBufferSize)
SO_SNDBUF
属性.
int getReceiveBufferSize()
SO_RCVBUF
属性.
void setReceiveBufferSize(int receiveBufferSize)
SO_RCVBUF
属性.
int getTrafficClass()
void setTrafficClass(int trafficClass)
DatagramSocket.setTrafficClass(int)
一样设置traffic类.
boolean isReuseAddress()
SO_REUSEADDR
属性.
void setReuseAddress(boolean reuseAddress)
SO_REUSEADDR
属性.
boolean isBroadcast()
SO_BROADCAST
属性.
void setBroadcast(boolean broadcast)
SO_BROADCAST
属性.
boolean isLoopbackModeDisabled()
true
void setLoopbackModeDisabled(boolean loopbackModeDisabled)
loopbackModeDisabled
- true
为禁止回路int getTimeToLive()
DatagramChannel
的多播数据包的默认生存时间.
void setTimeToLive(int ttl)
DatagramChannel
发送出去的多播数据包的默认生存时间,以便控制多播的范围.
java.net.InetAddress getInterface()
void setInterface(java.net.InetAddress interfaceAddress)
java.net.NetworkInterface getNetworkInterface()
DatagramChannel
发送的外发多播数据包的网络接口.
void setNetworkInterface(java.net.NetworkInterface networkInterface)
DatagramChannel
发送的外发多播数据包的网络接口.
ReceiveBufferSizePredictor getReceiveBufferSizePredictor()
ReceiveBufferSizePredictor
.默认预测机是
FixedReceiveBufferSizePredictor
(768).
void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
ReceiveBufferSizePredictor
. 默认预测机是
FixedReceiveBufferSizePredictor
(768).
ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory()
ReceiveBufferSizePredictor
没有设置时用于创建
ReceiveBufferSizePredictor
的
ReceiveBufferSizePredictorFactory
.If no predictor was set for the
channel,
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
will
be called with the new predictor. The default factory is
FixedReceiveBufferSizePredictorFactory
(768).
void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)
ReceiveBufferSizePredictor
which creates a new
ReceiveBufferSizePredictor
when a new channel is created and no
ReceiveBufferSizePredictor
was set. If no predictor was set for
the channel,
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
will
be called with the new predictor. The default factory is
FixedReceiveBufferSizePredictorFactory
(768).
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |