When working with sockets in Windows, multiple approaches are possible. Reading and writing data from a socket can happen asynchronously, so it doesnt block the execution of other code in your network applictaion.
this is called a nonblocking connection.
You can use blocking, nonblocking and multithread connection.
>It's a bad ideia to open a connection with ClientSocket >and close the connection imediately when I finished using >it?
Well it is up to you, but I would try multithread connection
mha