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 );
s
name
namelen
0
(zero)
-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. |
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/sys/socket.h | sys/types.h sys/socket.h |
netiff3m.lib |