Hi!
You can use the callback function, and see which event called the callback function. xType parameter specifies the event type, so in your case statement within the callback function, you can check if xType equals TCP_DISCONNECT.
Mika Fukuchi
Application Engineer
National Instruments