I am using ConnectToTCPServer function to connect to my TCP server. This
function doesn't take NULL for Callback Function parameter, so I am passing
a valid callback function but nothing inside, as shown below:
static int CVICALLBACK ClientTCPCB(unsigned Handle, int Event, int ErrCode,
void *pCallbackData)
{
switch (Event) {
case TCP_DATAREADY:
break;
case TCP_DISCONNECT:
break;
}
return 0;
}
With this, I see that my GUI seems to hang up as the above callback gets
called every so often as my server keeps sending data, maybe to fast.
So I put ProcessSystemEvents() in the above callback for TCP_DATAREADY case,
now it is running better. Is the right way to do it?
I am thinking of putting this callback
in a separate thread, that should fix
this problem.
vishi