Example usage for io.netty.channel.socket.nio NioServerSocketChannel localAddress

List of usage examples for io.netty.channel.socket.nio NioServerSocketChannel localAddress

Introduction

In this page you can find the example usage for io.netty.channel.socket.nio NioServerSocketChannel localAddress.

Prototype

@Override
    public InetSocketAddress localAddress() 

Source Link

Usage

From source file:org.springframework.cloud.stream.app.websocket.sink.WebsocketSinkServer.java

License:Apache License

public void run() throws InterruptedException {
    NioServerSocketChannel channel = (NioServerSocketChannel) new ServerBootstrap()
            .group(bossGroup, workerGroup).channel(NioServerSocketChannel.class)
            .handler(new LoggingHandler(nettyLogLevel())).childHandler(initializer).bind(properties.getPort())
            .sync().channel();//from   ww  w.  ja v  a 2  s . c  o m
    this.port = channel.localAddress().getPort();
    dumpProperties();
}

From source file:org.springframework.cloud.stream.module.websocket.sink.WebsocketSinkServer.java

License:Apache License

public void run() throws InterruptedException {
    NioServerSocketChannel channel = (NioServerSocketChannel) new ServerBootstrap()
            .group(bossGroup, workerGroup).channel(NioServerSocketChannel.class)
            .handler(new LoggingHandler(nettyLogLevel())).childHandler(initializer)
            .bind(properties.getWebsocketPort()).sync().channel();
    this.port = channel.localAddress().getPort();
    dumpProperties();//w w  w .  j a v  a2 s .co m
}