Example #1
0
        public static PhotonClientPacket CreatePacket(PhotonCode code = PhotonCode.OperationRequest)
        {
            var packet = new PhotonClientPacket();

            packet.Write((byte)code);
            return(packet);
        }
 public void SendOperationRequest(OperationRequest request)
 {
     using (var packet = PhotonClientPacket.CreatePacket())
         using (var buffer = new StreamBuffer(0))
         {
             SerializationProtocol.SerializeOperationRequest(buffer, request.OperationCode, request.Parameters, false);
             packet.Write(buffer.ToArray(), 0, (int)buffer.Length);
             Send(packet);
         }
 }