Class TcpUtils

java.lang.Object
zmq.io.net.tcp.TcpUtils

public class TcpUtils extends Object
  • Constructor Details

    • TcpUtils

      private TcpUtils()
  • Method Details

    • tuneTcpSocket

      public static void tuneTcpSocket(SocketChannel channel) throws IOException
      Throws:
      IOException
    • tuneTcpKeepalives

      public static void tuneTcpKeepalives(SocketChannel channel, int tcpKeepAlive, int tcpKeepAliveCnt, int tcpKeepAliveIdle, int tcpKeepAliveIntvl) throws IOException
      Throws:
      IOException
    • setTcpReceiveBuffer

      public static boolean setTcpReceiveBuffer(Channel channel, int rcvbuf)
    • setTcpSendBuffer

      public static boolean setTcpSendBuffer(Channel channel, int sndbuf)
    • setIpTypeOfService

      public static boolean setIpTypeOfService(Channel channel, int tos)
    • setReuseAddress

      public static boolean setReuseAddress(Channel channel, boolean reuse)
    • setOption

      private static boolean setOption(Channel channel, TcpUtils.OptionSetter setter)
    • unblockSocket

      public static void unblockSocket(SelectableChannel... channels) throws IOException
      Throws:
      IOException
    • enableIpv4Mapping

      public static void enableIpv4Mapping(SelectableChannel channel)
    • getPeerIpAddress

      public static Address getPeerIpAddress(SocketChannel channel)