public class RemotingUtil extends Object
Constructor and Description |
---|
RemotingUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
closeChannel(io.netty.channel.Channel channel) |
static SocketChannel |
connect(SocketAddress remote) |
static SocketChannel |
connect(SocketAddress remote,
int timeoutMillis) |
static String |
getLocalAddress() |
static boolean |
isLinuxPlatform() |
static String |
normalizeHostAddress(InetAddress localHost) |
static Selector |
openSelector() |
static String |
socketAddress2String(SocketAddress addr) |
static SocketAddress |
string2SocketAddress(String addr)
IP:PORT
|
public static final String OS_NAME
public static boolean isLinuxPlatform()
public static Selector openSelector() throws IOException
IOException
public static String getLocalAddress()
public static String normalizeHostAddress(InetAddress localHost)
public static SocketAddress string2SocketAddress(String addr)
public static String socketAddress2String(SocketAddress addr)
public static SocketChannel connect(SocketAddress remote)
public static SocketChannel connect(SocketAddress remote, int timeoutMillis)
public static void closeChannel(io.netty.channel.Channel channel)
Copyright © 2014. All Rights Reserved.