-convert the data received into a string. Int bytesRead = nwStream.Read(buffer, 0, client.ReceiveBufferSize) NetworkStream nwStream = client.GetStream() īyte buffer = new byte -get the incoming data through a network stream. TcpClient client = listener.AcceptTcpClient() TcpListener listener = new TcpListener(localAdd, 5000) IPAddress localAdd = IPAddress.Parse(IP) Ĭonsole.WriteLine("IP Address is :" + IP) Server Code //string IP = ServerSocket.getIP() I am not sure why i cant make a connection from my client application Using Putty, I can telnet from either machine and make a connection to the server On CMD i have confirmed the port is listening using netstat -a I have Checked all firewall rules and allowed traffic on port 5000 on both PCs The PCs are linked by Cat5e Ethernet cable over about half a meter. I can ping both PC's by name and IP address. Tried both client and server applications on the same PC, this will work, but if the applications are on different machines than I cant seem to get a connection due to a timeout. ctor(String hostname, Int32 port)īelow are the list of steps I have tried: Period of time, or established connection failed because connected (0x80004005): A connection attemptįailed because the connected party did not properly respond after a I have a small TCP Client server application that cannot seem to connect and is giving a timeout error and I can figure out why.
0 Comments
Leave a Reply. |