INtime SDK Help
connect (legacy networking)
INtime Help

Initiates a connection on a socket. If the socket type is SOCK_DGRAM, this call permanently specifies the peer to which datagrams. are to be sent. If the type is SOCK_STREAM, this call attempts to make a connection to another socket.

int connect(
    int s,
    struct sockaddr* name,
    int namelen
);

Parameters

s
The local socket.
name
The remote socket, specified as an address in the communications space of the socket. Each communications space interprets the name parameter in its own way.
namelen
The number of bytes in the name parameter.

Return Values

0 (zero)
Success.
-1, and the function sets errno to one of these values:
EBADF Invalid file descriptor or file not opened for writing.
ENOSPC No space left on device.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/sys/socket.h sys/types.h
sys/socket.h
netiff3m.lib
See Also