public async Task <T> WriteFlow <T>(WriteMessage WriteMessage) where T : OkayMessage, new() { await Core.SendMessage(WriteMessage); T ClientOkay = await Core.RecieveMessage <T>(); return(ClientOkay); }
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; } } }
public RecvSyncMessage(WriteMessage Message) : base(Message) { Payload = Encoding.UTF8.GetString(Message.Payload.Skip(8).Take(Parameter).ToArray()); }
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); }
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)); }