Search in sources :

Example 1 with DatagramRequest

use of com.generallycloud.baseio.protocol.DatagramRequest in project baseio by generallycloud.

the class ServerDatagramPacketAcceptor method accept.

@Override
public void accept(DatagramSession session, DatagramPacket packet) throws IOException {
    if (packet.getType() == DatagramPacket.TYPE_ACTION) {
        execute(session, new DatagramRequest(packet.getDataString()));
        return;
    }
    // logger.debug("___________________server receive,packet:{}",packet);
    SocketSession socketSession = session.getSocketSession();
    if (socketSession == null) {
        logger.debug("___________________null session,packet:{}", packet);
        return;
    }
    // FIXME UDP
    doAccept(session, packet, socketSession);
}
Also used : DatagramRequest(com.generallycloud.baseio.protocol.DatagramRequest) SocketSession(com.generallycloud.baseio.component.SocketSession)

Aggregations

SocketSession (com.generallycloud.baseio.component.SocketSession)1 DatagramRequest (com.generallycloud.baseio.protocol.DatagramRequest)1