how i know TCP Connect already ?

  • Thread starter Thread starter virat leelapattana
  • Start date Start date
V

virat leelapattana

i use TcpClient
client = new TcpClient(S"localhost", PORT_NUM);

when run code above

and now how to know when it connect server already

i don't want timer to Loop for check if(client->active)
 
virat said:
i use TcpClient
client = new TcpClient(S"localhost", PORT_NUM);

when run code above

and now how to know when it connect server already

i don't want timer to Loop for check
if(client->active)

As the documentation states, the call to the TcpClient
constructor is synchronous so, when it returns, either the
connection is already active or an exception has been trown.
 
thank !!
Alessandro
i new for c++
Alessandro Angeli said:
As the documentation states, the call to the TcpClient
constructor is synchronous so, when it returns, either the
connection is already active or an exception has been trown.


--

// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net
 
Back
Top