The TCP functions are asynchronous so they will continue like this. What you should do is put a while loop after the TCPWrite that is calling ProcessSystemEvents and is set to drop out of the loop when a flag is set. Then set that flag when you receive the response from the server. So, you code would be:
serverResponded = 0;
ClientTCPWrite(...);
while(!serverResponded)
ProcessSystemEvents();
Then, in when you get a event that the server responded, set the serverResponded flag to 1.
Best Regards,
Chris Matthews
National Instruments