|
@@ -65,9 +65,12 @@ namespace KcpServerTest
|
|
|
var length = BitConverter.ToInt32(lengthData, 0);
|
|
|
var data = await ReadServerBytesAsync(connection, length).ConfigureAwait(false);
|
|
|
Console.WriteLine($"Server connection [{connection.Id}] received: " + Encoding.UTF8.GetString(data));
|
|
|
- //var replyData = Encoding.UTF8.GetBytes("OK");
|
|
|
- //await connection.SendAsync(BitConverter.GetBytes(replyData.Length)).ConfigureAwait(false);
|
|
|
- //await connection.SendAsync(replyData).ConfigureAwait(false);
|
|
|
+ while (true)
|
|
|
+ {
|
|
|
+ var replyData = Encoding.UTF8.GetBytes("OK");
|
|
|
+ await connection.SendAsync(BitConverter.GetBytes(replyData.Length)).ConfigureAwait(false);
|
|
|
+ await connection.SendAsync(replyData).ConfigureAwait(false);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|