Search in sources :

Example 1 with EzySocketEventLoopOneHandler

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;
}
Also used : EzySocketEventLoopOneHandler(com.tvd12.ezyfoxserver.socket.EzySocketEventLoopOneHandler) EzyNioUdpReader(com.tvd12.ezyfoxserver.nio.udp.EzyNioUdpReader) EzyNioUdpReadingLoopHandler(com.tvd12.ezyfoxserver.nio.udp.EzyNioUdpReadingLoopHandler)

Example 2 with EzySocketEventLoopOneHandler

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;
}
Also used : EzySocketEventLoopOneHandler(com.tvd12.ezyfoxserver.socket.EzySocketEventLoopOneHandler)

Example 3 with EzySocketEventLoopOneHandler

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;
}
Also used : EzySocketEventLoopOneHandler(com.tvd12.ezyfoxserver.socket.EzySocketEventLoopOneHandler)

Aggregations

EzySocketEventLoopOneHandler (com.tvd12.ezyfoxserver.socket.EzySocketEventLoopOneHandler)3 EzyNioUdpReader (com.tvd12.ezyfoxserver.nio.udp.EzyNioUdpReader)1 EzyNioUdpReadingLoopHandler (com.tvd12.ezyfoxserver.nio.udp.EzyNioUdpReadingLoopHandler)1