mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Documentation update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@333 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+4
-4
@@ -54,15 +54,15 @@
|
||||
* Function: bind
|
||||
*
|
||||
* Description:
|
||||
* bind() gives the socket sockfd the local address my_addr. my_addr is
|
||||
* addrlen bytes long. Traditionally, this is called “assigning a name to
|
||||
* a socket.” When a socket is created with socket(2), it exists in a name
|
||||
* bind() gives the socket 'sockfd' the local address 'addr'. 'addr' is
|
||||
* 'addrlen' bytes long. Traditionally, this is called “assigning a name to
|
||||
* a socket.” When a socket is created with socket, it exists in a name
|
||||
* space (address family) but has no name assigned.
|
||||
*
|
||||
* Parameters:
|
||||
* sockfd Socket descriptor from socket
|
||||
* addr Socket local address
|
||||
* addrlen Length of my_addr
|
||||
* addrlen Length of 'addr'
|
||||
*
|
||||
* Returned Value:
|
||||
* 0 on success; -1 on error with errno set appropriately
|
||||
|
||||
+6
-6
@@ -55,15 +55,15 @@
|
||||
*
|
||||
* Description:
|
||||
* connect() connects the socket referred to by the file descriptor sockfd
|
||||
* to the address specified by serv_addr. The addrlen argument specifies
|
||||
* the size of serv_addr. The format of the address in serv_addr is
|
||||
* to the address specified by 'addr'. The addrlen argument specifies
|
||||
* the size of 'addr'. The format of the address in 'addr' is
|
||||
* determined by the address space of the socket sockfd.
|
||||
*
|
||||
* If the socket sockfd is of type SOCK_DGRAM then serv_addr is the address
|
||||
* If the socket sockfd is of type SOCK_DGRAM then 'addr' is the address
|
||||
* to which datagrams are sent by default, and the only address from which
|
||||
* datagrams are received. If the socket is of type SOCK_STREAM or
|
||||
* SOCK_SEQPACKET, this call attempts to make a connection to the socket
|
||||
* that is bound to the address specified by serv_addr.
|
||||
* that is bound to the address specified by 'addr'.
|
||||
*
|
||||
* Generally, connection-based protocol sockets may successfully connect()
|
||||
* only once; connectionless protocol sockets may use connect() multiple
|
||||
@@ -73,8 +73,8 @@
|
||||
*
|
||||
* Parameters:
|
||||
* sockfd Socket descriptor returned by socket()
|
||||
* serv_addr Server address (form depends on type of socket)
|
||||
* addrlen Lenght of actual serv_addr
|
||||
* addr Server address (form depends on type of socket)
|
||||
* addrlen Length of actual 'addr'
|
||||
*
|
||||
* Returned Value:
|
||||
* 0 on success; -1 on error with errno set appropriately
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ void recvfrom_interrupt(void *private)
|
||||
* EINVAL
|
||||
* Invalid argument passed.
|
||||
* ENOMEM
|
||||
* Could not allocate memory for recvmsg().
|
||||
* Could not allocate memory.
|
||||
* ENOTCONN
|
||||
* The socket is associated with a connection-oriented protocol and has
|
||||
* not been connected.
|
||||
|
||||
Reference in New Issue
Block a user