public class NettyServer
extends java.lang.Object
NettyClient
Modifier and Type | Field and Description |
---|---|
private io.netty.bootstrap.ServerBootstrap |
bootstrap |
private io.netty.channel.EventLoopGroup |
bossGroup |
private io.netty.channel.ChannelFuture |
channelFuture |
private io.netty.channel.EventLoopGroup |
workerGroup |
Constructor and Description |
---|
NettyServer(LocalHost localHost,
java.lang.String address,
int port,
ConnectListener connectListener)
Creates a server listening on specified address.
|
Modifier and Type | Method and Description |
---|---|
void |
start()
Starts the server.
|
void |
stop()
Stops the server.
|
private final io.netty.channel.EventLoopGroup bossGroup
private final io.netty.channel.EventLoopGroup workerGroup
private final io.netty.bootstrap.ServerBootstrap bootstrap
private io.netty.channel.ChannelFuture channelFuture
public NettyServer(LocalHost localHost, java.lang.String address, int port, ConnectListener connectListener)