private static void StartCrowdControlServer() { var client = new CrowdControlClient(); // Setup handlers client.Connected += new ConnectedHandler(CrowdControlEventManager.ClientConnected); client.MessageReceived += new ClientMessageReceivedHandler(CrowdControlEventManager.ClientMessageReceived); client.MessageSubmitted += new ClientMessageSubmittedHandler(CrowdControlEventManager.ClientMessageSent); client.StartClient(); }
private static void StartCrowdControlServer() { // https://codereview.stackexchange.com/questions/24758/tcp-async-socket-server-client-communication var client = new CrowdControlClient(); // Setup handlers client.Connected += new ConnectedHandler(CrowdControlEventManager.ClientConnected); client.MessageReceived += new ClientMessageReceivedHandler(CrowdControlEventManager.ClientMessageReceived); client.MessageSubmitted += new ClientMessageSubmittedHandler(CrowdControlEventManager.ClientMessageSent); client.StartClient(); //new Thread(new ThreadStart(client.StartClient)).Start(); }