public void SendPacket(SplittableHeader header) { foreach (byte[] arr in header.GetData(Console)) { byte[] arrOut = MakePacket(arr, header.Type); SendToConsole(arrOut); } }
public async Task <Enums.FehlerT> SendPacketAsync(SplittableHeader header) { TaskCompletionSource <Enums.FehlerT> src = new TaskCompletionSource <Enums.FehlerT>(); completionQueue.Enqueue(src); foreach (byte[] arr in header.GetData(Console)) { byte[] arrOut = MakePacket(arr, header.Type); SendToConsole(arrOut); } return(await src.Task); }
public async Task <Enums.FehlerT> QueryAsync(SplittableHeader header) => await Connection.SendPacketAsync(header).ConfigureAwait(false);
/// <summary> /// Send packet to console /// </summary> /// <param name="packet"></param> public void Query(SplittableHeader packet) => Connection.SendPacket(packet);