public class RemotingUtil extends Object
| 构造器和说明 |
|---|
RemotingUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 boolean |
isWindowsPlatform() |
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 isWindowsPlatform()
public static Selector openSelector() throws IOException
IOExceptionpublic static boolean isLinuxPlatform()
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 © 2012–2016. All rights reserved.