01-27-2016 10:42 AM
I'm using the ConnectToTCPServer function to try to connect to a TCP server, but when I change the port to something invalid, the function does not return an error. How can I poll the connection to determine whether I'm connected in a gracefull manner?
01-28-2016 04:31 PM
Hi Steve_Block,
Just to clarify, the integer returned by ConnectToTCPServer is always a 0, even if you are supplying an invalid port number?
01-29-2016 07:28 AM
So how do I know the port is valid and the connection was successful?
02-01-2016 03:23 PM
Hi Steve_Block,
ConnectToTCPServer should return a 0 if the port is valid and the connection was successful. Do you mean that the function is returning a 0 even if you are supplying it with a port number which you expect to be invalid?
What is the intended use of your application, and what port numbers are you using to test the function? After calling the function, assuming a connection is established, are you able to read from the server using ClientTCPRead?