Changing TCPUtils to use SocketAsyncEventArgs instead of TAP functions, simple client<->server works with echoing messages

This commit is contained in:
Taha Afzal committed 2023-12-20 11:32:53 -05:00
1 parent cdc7da8c59
commit 1ceea4af5a
7 files changed
+217 -305

No files matched your search

+7 -2
View File
@@ -15,10 +15,15 @@ namespace BCG {
/// </summary>
[STAThread]
public static async Task Main(string[] args) {
bool run_echo_tcp_server_only = true;
bts.utils.BTSNativeMethods.provide_command_line(new string[] { }, 0);
mbts.config.Configuration.initialize();
// SimpleTCPServerAsync.start();
// Task.Delay(1000000000).Wait();
if (run_echo_tcp_server_only) {
Console.WriteLine("Running as TCP Echo server, Hit key to continue");
Console.ReadLine();
await SimpleTCPServerAsync.start();
Task.Delay(1000000000).Wait();
}
if (args.Length > 0 && args[0] == "daemon")
args = args.Skip(1).ToArray();