Package su.lafayette.udptracker.network.packets

Examples of su.lafayette.udptracker.network.packets.ClientRequest


    int actionId = channelBuffer.readInt();
    int transactionId = channelBuffer.readInt();

    Action action = Action.byId(actionId);

    ClientRequest request;

    switch (action) {
      case CONNECT:
        request = new ConnectionRequest();
        break;
      case ANNOUNCE:
        request = new AnnounceRequest();
        break;
      case SCRAPE:
        request = new ScrapeRequest();
        break;
      default:
        logger.debug("Incorrect action supplied");
        ErrorResponse.send(e, transactionId, "Incorrect action");
        return;
    }

    request.setContext(ctx);
    request.setMessageEvent(e);
    request.setChannelBuffer(channelBuffer);
    request.setConnectionId(connectionId);
    request.setAction(action);
    request.setTransactionId(transactionId);

    request.read();
  }
View Full Code Here

TOP

Related Classes of su.lafayette.udptracker.network.packets.ClientRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.