use of com.tvd12.ezyfoxserver.socket.EzySocketEventLoopOneHandler in project ezyfox-server by youngmonkeys.
the class EzyUdpServerBootstrap method newReadingLoopHandler.
private EzySocketEventLoopHandler newReadingLoopHandler() {
EzySocketEventLoopOneHandler loopHandler = new EzyNioUdpReadingLoopHandler();
loopHandler.setThreadPoolSize(getSocketReaderPoolSize());
EzyNioUdpReader eventHandler = new EzyNioUdpReader(getUdpMaxRequestSize());
eventHandler.setOwnSelector(readSelector);
eventHandler.setUdpDataHandler(udpDataHandler);
loopHandler.setEventHandler(eventHandler);
return loopHandler;
}
use of com.tvd12.ezyfoxserver.socket.EzySocketEventLoopOneHandler in project ezyfox-server by youngmonkeys.
the class EzySocketServerBootstrap method newSocketAcceptanceLoopHandler.
private EzySocketEventLoopHandler newSocketAcceptanceLoopHandler(EzyNioSocketAcceptor socketAcceptor) {
EzySocketEventLoopOneHandler loopHandler = new EzyNioSocketAcceptanceLoopHandler();
loopHandler.setThreadPoolSize(getSocketAcceptorPoolSize());
socketAcceptor.setTcpNoDelay(getSocketTcpNoDelay());
socketAcceptor.setReadSelector(readSelector);
socketAcceptor.setOwnSelector(acceptSelector);
socketAcceptor.setAcceptableConnections(new ArrayList<>());
socketAcceptor.setHandlerGroupManager(handlerGroupManager);
loopHandler.setEventHandler(socketAcceptor);
return loopHandler;
}
use of com.tvd12.ezyfoxserver.socket.EzySocketEventLoopOneHandler in project ezyfox-server by youngmonkeys.
the class EzySocketServerBootstrap method newReadingLoopHandler.
private EzySocketEventLoopHandler newReadingLoopHandler(EzyNioAcceptableConnectionsHandler acceptableConnectionsHandler) {
EzySocketEventLoopOneHandler loopHandler = new EzyNioSocketReadingLoopHandler();
loopHandler.setThreadPoolSize(getSocketReaderPoolSize());
EzyNioSocketReader eventHandler = new EzyNioSocketReader();
eventHandler.setOwnSelector(readSelector);
eventHandler.setSocketDataReceiver(socketDataReceiver);
eventHandler.setAcceptableConnectionsHandler(acceptableConnectionsHandler);
loopHandler.setEventHandler(eventHandler);
return loopHandler;
}
Aggregations