How to turn off the TCP delay in a LabWindows client application

The following is an example of how to turn off the TCP delay between a LabWindows client application and the Gryphon server.

The ConnectToTCPServer and GetHostTCPSocketHandle are calls to the LabWindows TCP Library. The wsock32.dll, wsock32.lib and winsock.h files are needed. The winsock.h and wsock32.lib files are in the LabWindows SDK directory.


   portNumber = 7000; 
   /*----------------------------------------------------------*/ 
   /* attempt to connect to server and wait in user event loop */    /*----------------------------------------------------------*/ 
   SetWaitCursor (1); 
   if (ConnectToTCPServer (&handle, portNumber, serverName, ClientCallback, 
    NULL, 5000)<0) { 
       MessagePopup("TCP Client", "Connection to server failed !"); 
    return -1001; 
   } 
   else { 
    MessagePopup("TCP Client", "Connected to server!"); 
   } 

   gHandle = handle; 
   SetWaitCursor (1); 

   /*get the Host socket handle*/ 
   ierr = GetHostTCPSocketHandle(handle,&sockethandle); 


   ierr = setsockopt(sockethandle,6,1,"1",4); 


This document was obtained from:

Dearborn Group, Inc.
(248) 488-2080
dg@dgtech.com
http://www.dgtech.com

Copyright © 2003 Dearborn Group Inc.