Example usage for io.netty.util NetUtil LOCALHOST

List of usage examples for io.netty.util NetUtil LOCALHOST

Introduction

In this page you can find the example usage for io.netty.util NetUtil LOCALHOST.

Prototype

InetAddress LOCALHOST

To view the source code for io.netty.util NetUtil LOCALHOST.

Click Source Link

Document

The InetAddress that represents the loopback address.

Usage

From source file:reactor.ipc.netty.tcp.TcpServer.java

License:Open Source License

/**
 * Bind a new TCP server to "loopback" on the given port.
 * Handlers will run on the same thread they have beem receiving IO events.
 * <p> The type of emitted data or received data is {@link ByteBuf}
 *
 * @param port the port to listen on loopback
 *
 * @return a new {@link TcpServer}//from  ww  w  . java 2  s . c om
 */
public static TcpServer create(int port) {
    return create(NetUtil.LOCALHOST.getHostAddress(), port);
}

From source file:reactor.ipc.netty.udp.UdpClient.java

License:Open Source License

/**
 * Bind a new UDP client to the "loopback" address.
 * Handlers will run on the same thread they have beem receiving IO events.
 * <p> The type of emitted data or received data is {@link ByteBuf}
 *
 * @return a new {@link UdpClient}/* w w w  .  j  a va 2s .  c om*/
 */
public static UdpClient create() {
    return create(NetUtil.LOCALHOST.getHostAddress());
}

From source file:reactor.ipc.netty.udp.UdpClient.java

License:Open Source License

/**
 * Bind a new UDP client to the "loopback" address and specified port.
 * Handlers will run on the same thread they have beem receiving IO events.
 * <p> The type of emitted data or received data is {@link ByteBuf}
 *
 * @param port the port to listen on the passed bind address
 *
 * @return a new {@link UdpClient}//from   w  w  w . j  a  v  a 2  s .c  o m
 */
public static UdpClient create(int port) {
    return create(NetUtil.LOCALHOST.getHostAddress(), port);
}