예제 #1
0
        public static void Main(string[] args)
        {
            try
            {
                _settings = new ClientSettings();

                ConfigureServices();

                Console.WriteLine("Press the enter key to connect the server. Waiting to start...");
                Console.ReadKey();
                Console.WriteLine("Waiting for order!");
                var socketTask = Task.Run(async () =>
                {
                    await ConnectToWebSocket();
                });
                socketTask.Wait();
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Exception: {ex}");
            }
        }
 public ClientMessageDispatcher(ClientSettings settings, WebSocket webSocket, Guid clientId)
 {
     _clientId = clientId;
     _settings = settings;
     _webSocket = webSocket;
 }