public class SimpleTcpServer extends AbstractLifeCycle
| 限定符和类型 | 类和说明 |
|---|---|
class |
SimpleTcpServer.AbstractHandler |
| 限定符和类型 | 字段和说明 |
|---|---|
protected Action1<TcpConnection> |
accept |
protected Func1<List<String>,String> |
alpnSelectProtocols |
protected Action0 |
alpnUnsupported |
protected TcpServerConfiguration |
config |
protected Action2<Integer,Throwable> |
failedAcceptance |
protected AsynchronousTcpServer |
server |
start| 构造器和说明 |
|---|
SimpleTcpServer() |
SimpleTcpServer(TcpServerConfiguration config) |
| 限定符和类型 | 方法和说明 |
|---|---|
SimpleTcpServer |
accept(Action1<TcpConnection> accept) |
SimpleTcpServer |
accept(Action1<TcpConnection> accept,
Action2<Integer,Throwable> failed) |
SimpleTcpServer |
alpnSelectProtocols(Func1<List<String>,String> alpnSelectProtocols) |
SimpleTcpServer |
alpnUnsupported(Action0 alpnUnsupported) |
protected void |
destroy() |
protected void |
init() |
void |
listen(String host,
int port) |
isStarted, isStopped, start, stopprotected Action1<TcpConnection> accept
protected Action0 alpnUnsupported
protected AsynchronousTcpServer server
protected TcpServerConfiguration config
public SimpleTcpServer()
public SimpleTcpServer(TcpServerConfiguration config)
public SimpleTcpServer accept(Action1<TcpConnection> accept)
public SimpleTcpServer accept(Action1<TcpConnection> accept, Action2<Integer,Throwable> failed)
public SimpleTcpServer alpnUnsupported(Action0 alpnUnsupported)
public SimpleTcpServer alpnSelectProtocols(Func1<List<String>,String> alpnSelectProtocols)
public void listen(String host, int port)
protected void init()
init 在类中 AbstractLifeCycleprotected void destroy()
destroy 在类中 AbstractLifeCycleCopyright © 2016. All rights reserved.