- 论坛徽章:
- 7
|
man connect:
SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t
addrlen);
RETURN VALUE
If the connection or binding succeeds, zero is returned. On error, -1
is returned, and errno is set appropriately.
ERRORS
The following are general socket errors only. There may be other
domain-specific error codes.
EBADF The file descriptor is not a valid index in the descriptor ta-
ble.
EFAULT The socket structure address is outside the userâ |
|