SysSockConnect

This function of type BOOL calls the function connect of the operating system. In case the socket has not yet been “bound” by the SysSockBind function, now automatically a local address will be assigned to it. Afterwards the socket will be ready to send and /or receive data.

In case of successful operation the function will return TRUE, otherwise FALSE.

Variable Data type Description
diSocket DINT

Descriptor of the socket, returned by SysSockCreate

(corresponding parameter e.g. in Win32: s)

pSockAddr DWORD

Pointer on a variable of type SOCKADDR;

(see SysSockAccept)

diSockAddrSize DINT

Length of the structure SOCKADDR;

(can be retrieved with the aid of the SIZEOF operator)

Note for operating system VxWorks: There are systems on which function SysSockConnect returns FALSE even in case of success. Reason: The special behaviour of connect under VxWorks.