コード例 #1
0
 public void SendPacket(SplittableHeader header)
 {
     foreach (byte[] arr in header.GetData(Console))
     {
         byte[] arrOut = MakePacket(arr, header.Type);
         SendToConsole(arrOut);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public async Task <Enums.FehlerT> QueryAsync(SplittableHeader header) => await Connection.SendPacketAsync(header).ConfigureAwait(false);
コード例 #4
0
 /// <summary>
 /// Send packet to console
 /// </summary>
 /// <param name="packet"></param>
 public void Query(SplittableHeader packet) => Connection.SendPacket(packet);