6-2-2 Function Descriptions
ADAMTCP_Connect
Description:
Establish a Windows Sockets connection in a specified ADAM-6000 I/O module.
Syntax:
int ADAMTCP_Connect(int socket_type, char *szIP, unsigned short port, SOCKET *conn_socket,
int iConnectionTimeout, int iSendTimeout, int iReceiveTimeout);
Parameter:
socket_type[in]: to specify the connection type that is UDP or TCP.
szIP[in]: the IP address for ADAM-6000 that to be connected.
port[in]: the connection port
conn_socket[out]: the handle that represent a socket
iConnectionTimeout[in]: the specified timeout interval for connecting to the ADAM-6000
iSendTimeout[in]: the specified timeout interval for sending a command to the ADAM-6000
iReceiveTimeout[in]: the specified timeout interval for receiving response from the ADAM-6000
Return:
Please refer to Chapter 6-2-3 “Return Codes” for more detail information