예제 #1
0
        public async Task <T> WriteFlow <T>(WriteMessage WriteMessage) where T : OkayMessage, new()
        {
            await Core.SendMessage(WriteMessage);

            T ClientOkay = await Core.RecieveMessage <T>();

            return(ClientOkay);
        }
예제 #2
0
        public DataSyncMessage(WriteMessage Message) : base(Message)
        {
            Payload = Message.Payload.Skip(8).Take(Parameter).ToArray();

            if (Message.PayloadLength - Parameter == 8)
            {
                string EOF = Encoding.UTF8.GetString(Message.Payload.Skip(Message.Payload.Length - 8).Take(4).ToArray());

                if (EOF == "DONE")
                {
                    EndOfFile = true;
                }
            }
        }
예제 #3
0
 public RecvSyncMessage(WriteMessage Message) : base(Message)
 {
     Payload = Encoding.UTF8.GetString(Message.Payload.Skip(8).Take(Parameter).ToArray());
 }
예제 #4
0
 public SyncMessage(WriteMessage Message)
 {
     this.Message = Message;
     ID           = Encoding.UTF8.GetString(Message.Payload.Take(4).ToArray());
     Parameter    = GetLittleEndianIntegerFromByteArray(Message.Payload.Skip(4).Take(4).ToArray(), 0);
 }
예제 #5
0
        public async Task <T> WriteFlow <T>(uint LocalID, uint RemoteID, byte[] Payload) where T : OkayMessage, new()
        {
            WriteMessage WriteMessage = new WriteMessage(LocalID, RemoteID, Payload);

            return(await WriteFlow <T>(WriteMessage));
        }