Package zmq.io.net.tcp
Class TcpUtils
java.lang.Object
zmq.io.net.tcp.TcpUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidenableIpv4Mapping(SelectableChannel channel) static AddressgetPeerIpAddress(SocketChannel channel) Deprecated.static booleansetIpTypeOfService(Channel channel, int tos) static booleansetReuseAddress(Channel channel, boolean reuse) static booleansetTcpReceiveBuffer(Channel channel, int rcvbuf) static booleansetTcpSendBuffer(Channel channel, int sndbuf) static voidtuneTcpKeepalives(Channel channel, int tcpKeepAlive, int tcpKeepAliveCnt, int tcpKeepAliveIdle, int tcpKeepAliveIntvl) static voidtuneTcpSocket(Channel channel) static voidunblockSocket(SelectableChannel... channels)
-
Field Details
-
WITH_EXTENDED_KEEPALIVE
public static final boolean WITH_EXTENDED_KEEPALIVE
-
-
Method Details
-
tuneTcpSocket
- Throws:
IOException
-
tuneTcpKeepalives
public static void tuneTcpKeepalives(Channel channel, int tcpKeepAlive, int tcpKeepAliveCnt, int tcpKeepAliveIdle, int tcpKeepAliveIntvl) -
setTcpReceiveBuffer
-
setTcpSendBuffer
-
setIpTypeOfService
-
setReuseAddress
-
unblockSocket
- Throws:
IOException
-
enableIpv4Mapping
-
getPeerIpAddress
Deprecated.UseUtils.getPeerIpAddress(SocketChannel)insteadReturn theAddressof the channel- Parameters:
channel- the channel, should be a TCP socket channel- Returns:
- The
Addressof the channel - Throws:
ZError.IOException- if the channel is closed or an I/O errors occurredIllegalArgumentException- if the SocketChannel is not a TCP channel
-
Utils.getPeerIpAddress(SocketChannel)instead