Chapter 7 TCP Library
© National Instruments Corporation 7-5 LabWindows/CVI Standard Libraries
Return Value
status integer Returns the number of bytes
written, or a negative error code
if an error occurs; Refer to error
codes in Table 7-3.
See Also
ConnectToTCPServer, ClientTCPRead
ConnectToTCPServer
int status = ConnectToTCPServer (unsigned int *conversationHandle,
unsigned int portNumber,
char serverHostName[],
tcpFuncPtr clientCallbackFunction,
void *callbackData, unsigned int timeout);
Purpose
Establishes a conversation between your program and a pre-existing server. Your program
becomes a client.
Parameters
Input portNumber unsigned integer Uniquely identifies a server on
a single machine.
serverHostName character array Can either be the host name or
IP address string.
For example, aaa.bbb.ccc
or 123.456.78.90.
clientCallbackFunction TCP function
pointer Pointer to the user callback
function.
callbackData void pointer User-defined data.
timeout unsigned integer Timeout in ms.
Output conversationHandle unsigned integer Uniquely identifies the
conversation.