Class NioTCPServer
java.lang.Object
cool.scx.tcp.NioTCPServer
- All Implemented Interfaces:
ScxTCPServer
NIO TCP 服务器
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiononConnect(Consumer<ScxTCPSocket> connectHandler) voidstart()voidstop()
-
Constructor Details
-
NioTCPServer
public NioTCPServer() -
NioTCPServer
-
-
Method Details
-
onConnect
- Specified by:
onConnectin interfaceScxTCPServer
-
start
public void start()- Specified by:
startin interfaceScxTCPServer
-
stop
public void stop()- Specified by:
stopin interfaceScxTCPServer
-
localAddress
- Specified by:
localAddressin interfaceScxTCPServer
-