NetworkStream stream = myBinaryReader.BaseStream;do{ if (!stream.DataAvailable) { continue; } var bytesRead = await stream.ReadAsync(buffer, ct); await webSocket.SendAsync(new ArraySegment<byte>(buffer, 0, read), WebSocketMessageType.Binary, true, ct)} while( --things are connected-- )