![]() NetworkStream stream = client.GetStream() Ĭonsole.WriteLine("Writing data to the stream.") īyte bytes = ("Hello, world.") Server = new TcpListener(IPAddress.Parse("127.0.0.1"), (int)) Ĭonsole.WriteLine("Error while trying to start the server: ", exception.ToString()) Ĭonsole.WriteLine("A client has connected.") Ĭonsole.WriteLine("Opening up a TcpClient.") Ĭonsole.WriteLine("TcpClient has connected.") WebSocketServer server = new WebSocketServer() Ĭonsole.WriteLine("The WebSocket server has started.") ĭialogResult result = MessageBox.Show("Do you want to shut the server down?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) ĬoncurrentDictionary clients = new ConcurrentDictionary() Testing the code when the client and server are local works, but when I try connecting to a remote machine, it no longer works.Ĭonsole.WriteLine("Starting a new WebSockets server.") ![]() I'm trying to connect to a remote machine using the TcpClient class, but it keeps failing:Īn unhandled exception of type ''Īdditional information: A connection attempt failed because theĬonnected party did not properly respond after a period of time, orĮstablished connection failed because connected host has failed to ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |