10-09-2011 11:26 AM
Hello,
I'd like to know if the 2nd parameter of the function is corresponding to the "SOCKET" type in the Windows SDK? Can you tell me the usage of this function? Thanks.
David
10-10-2011 01:54 AM
Phototype:
int GetHostTCPSocketHandle(unsigned int Connection_Handle,int *Socket_Handle);
Connection_Handle: TCP Support Library conversation handle that you obtain from ConnectToTCPServer or ConnectToTCPServerEx or receive in a server callback as the handle parameter of a TCP_CONNECT message.
*Socket_Handle: System socket handle for the connection that connectionHandle identifies. (passed by reference);
Status: Return value indicating whether the function was successful. Unless otherwise stated, zero represents successful execution and a negative number represents the error code.
You can call the GetTCPSystemErrorString function to obtain a system message that describes the error. The system messages can be more descriptive than the TCP Support Library error codes. To obtain the correct system error message, you must call GetTCPSystemErrorString immediately after calling the TCP Support Library function that failed.
For functions that read or write data (ClientTCPRead, ClientTCPWrite, ServerTCPRead, ServerTCPWrite), if the function was successful, the return value is the number of bytes transferred.
You can have a maximum of 255 concurrent conversations and up to 1,024 connections. If you exceed this limit, -kTCP_TooManyConnections will be returned. You may not be able to open the maximum number of connections allowed by LabWindows/CVI because of limitations imposed by the operating system.
10-10-2011 04:41 AM
Hi,
Can I recognize the parameter 'intptr_t **socketHandle' as the SOCKET type which in the SDK?
David
10-10-2011 10:25 AM
Yes.