Search in sources :

Example 11 with EzySocketRequest

use of com.tvd12.ezyfoxserver.socket.EzySocketRequest in project ezyfox-server by youngmonkeys.

the class EzySocketRequestHandler method processRequest.

private void processRequest(EzySocketRequest request) throws Exception {
    try {
        EzyArray data = request.getData();
        EzySession session = request.getSession();
        EzySocketDataHandlerGroup handlerGroup = getDataHandlerGroup(session);
        if (handlerGroup != null) {
            handlerGroup.fireChannelRead(request.getCommand(), data);
        } else {
            logger.warn("has no handler group with session: {}, drop request: {}", session, request);
        }
    } finally {
        request.release();
    }
}
Also used : EzyArray(com.tvd12.ezyfox.entity.EzyArray) EzySession(com.tvd12.ezyfoxserver.entity.EzySession)

Aggregations

EzySession (com.tvd12.ezyfoxserver.entity.EzySession)9 Test (org.testng.annotations.Test)8 EzyArray (com.tvd12.ezyfox.entity.EzyArray)7 EzySocketRequest (com.tvd12.ezyfoxserver.socket.EzySocketRequest)4 EzyNonBlockingRequestQueue (com.tvd12.ezyfoxserver.socket.EzyNonBlockingRequestQueue)2 EzyRequestQueue (com.tvd12.ezyfoxserver.socket.EzyRequestQueue)2 EzySessionTicketsRequestQueues (com.tvd12.ezyfoxserver.socket.EzySessionTicketsRequestQueues)2 EzySimpleSocketRequest (com.tvd12.ezyfoxserver.socket.EzySimpleSocketRequest)2 BaseTest (com.tvd12.test.base.BaseTest)2