List of usage examples for io.netty.channel.socket.nio NioServerSocketChannel localAddress
@Override
public InetSocketAddress localAddress()
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 }