INtime SDK Help
bind (legacy networking)
INtime Help

Assigns a name to an unnamed socket. When a socket is created with socket it exists in a name space (address family) but has no name assigned. A name must be bound to the socket before the socket can be used.

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

Parameters

s
The socket to be bound.
name
Points to the structure that contains the name. The rules used in name binding vary between communication domains. In the AF_INET domain, a name consists of the address family (AF_INET), a port ID, and an IP address. For more information about addresses, see Internet Socket Addresses.
namelen
The length of the name.

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