Ejemplo n.º 1
0
 private void testServerSendPacket(Client2 client)
 {
     /////////////// TEST SENDING BACK SOME BYTES BACK TO CLIENTS!
     packetStreamTemp.ResetByteIndex();
     packetStreamTemp.WriteBytes((byte)EPacketProtoID._00_HEART_BEAT << 4);
     trace(client._endpointIn + ":         >>>>>>> SENDING: " + packetStreamTemp.byteLength);
 }
Ejemplo n.º 2
0
        private void WriteHeader(PacketStream2 stream, EPacketProtoID protoID, byte protoParams)
        {
            byte protoIDOffset = (byte)((int)protoID << 4);

            stream.ResetByteIndex();
            stream.WriteBytes(protoIDOffset | protoParams);
        }