Class TransportUtil


  • public class TransportUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TransportUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String formatAddress​(java.net.InetSocketAddress socketAddress)
      Format Address, priority use of IP
      static java.util.List<java.lang.String> getLocalIPAddress()  
      static java.lang.String host​(java.net.InetSocketAddress socketAddress)  
      static java.lang.String readString​(io.netty.buffer.ByteBuf buf)  
      static java.lang.String remoteAddress​(io.netty.channel.Channel channel)  
      static ConnectionId remoteConnectionId​(io.netty.channel.Channel channel)  
      static java.net.InetAddress resolvedAddress​(java.lang.String host)  
      static java.net.InetSocketAddress resolvedSocketAddress​(java.lang.String host, int port)  
      static void setMaxBytesPerRead​(io.netty.channel.Channel channel, int length)  
      static void writeString​(io.netty.buffer.ByteBuf buf, java.lang.String value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TransportUtil

        public TransportUtil()
    • Method Detail

      • remoteAddress

        public static java.lang.String remoteAddress​(io.netty.channel.Channel channel)
      • remoteConnectionId

        public static ConnectionId remoteConnectionId​(io.netty.channel.Channel channel)
      • resolvedAddress

        public static java.net.InetAddress resolvedAddress​(java.lang.String host)
      • resolvedSocketAddress

        public static java.net.InetSocketAddress resolvedSocketAddress​(java.lang.String host,
                                                                       int port)
      • host

        public static java.lang.String host​(java.net.InetSocketAddress socketAddress)
      • getLocalIPAddress

        public static java.util.List<java.lang.String> getLocalIPAddress()
      • formatAddress

        public static java.lang.String formatAddress​(java.net.InetSocketAddress socketAddress)
        Format Address, priority use of IP
      • readString

        public static java.lang.String readString​(io.netty.buffer.ByteBuf buf)
      • writeString

        public static void writeString​(io.netty.buffer.ByteBuf buf,
                                       java.lang.String value)
      • setMaxBytesPerRead

        public static void setMaxBytesPerRead​(io.netty.channel.Channel channel,
                                              int length)