public class RemotingUtil extends Object
| 构造器和说明 |
|---|
RemotingUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
parseLocalAddress(io.netty.channel.Channel channel)
Parse the local address of the channel.
|
static String |
parseLocalIP(io.netty.channel.Channel channel)
Parse the local host ip of the channel.
|
static int |
parseLocalPort(io.netty.channel.Channel channel)
Parse the local host port of the channel.
|
static String |
parseRemoteAddress(io.netty.channel.Channel channel)
Parse the remote address of the channel.
|
static String |
parseRemoteHostName(io.netty.channel.Channel channel)
Parse the remote hostname of the channel.
|
static String |
parseRemoteIP(io.netty.channel.Channel channel)
Parse the remote host ip of the channel.
|
static int |
parseRemotePort(io.netty.channel.Channel channel)
Parse the remote host port of the channel.
|
static String |
parseSocketAddressToHostIp(SocketAddress socketAddress)
Parse the host ip of socket address.
|
static String |
parseSocketAddressToString(SocketAddress socketAddress)
Parse the socket address, omit the leading "/" if present.
|
public static String parseRemoteAddress(io.netty.channel.Channel channel)
channel - public static String parseLocalAddress(io.netty.channel.Channel channel)
channel - public static String parseRemoteIP(io.netty.channel.Channel channel)
channel - public static String parseRemoteHostName(io.netty.channel.Channel channel)
InetAddress.getHostName().channel - public static String parseLocalIP(io.netty.channel.Channel channel)
channel - public static int parseRemotePort(io.netty.channel.Channel channel)
channel - public static int parseLocalPort(io.netty.channel.Channel channel)
channel - public static String parseSocketAddressToString(SocketAddress socketAddress)
socketAddress - public static String parseSocketAddressToHostIp(SocketAddress socketAddress)
socketAddress - Copyright © 2020. All rights reserved.