Package org.activeio

Examples of org.activeio.PacketData.readShort()


        try {
            if( requestListener ==null )
                throw new IOException("The RequestListener has not been set.");

            PacketData data = new PacketData(packet);
            short requestId = data.readShort();           
            Packet reponse = requestListener.onRequest(packet);

            // Send the response...
            Packet header = createHeaderPacket(RESPONSE, requestId);       
            Packet rc = AppendedPacket.join(header, packet);       
View Full Code Here


    private void serviceReponse(Packet packet) {
       
        try {
           
            PacketData data = new PacketData(packet);
            short requestId = data.readShort();
           
            Slot responseSlot = (Slot) requestMap.get(new Short(requestId));
            responseSlot.put(packet);
           
        } catch (IOException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.