Home |
Function net_recv |
Function net_recvReceives data. SOCKET net_recv(SOCKET socket, char * buffer, int size, int Seconds); ParameterssocketSocket returned by net_socket, socket, net_accept, or accept. bufferBuffer to receive the received data. sizeMaximum number of bytes to receive. SecondsTimeout in seconds. This parameter is ignored if zero, which means the operation waits indefinitely for sockets in blocking mode or returns immediately for sockets in non-blocking mode. Value RTIP_INF will wait indefinitely. return valueThe number of bytes available in the buffer, 0 if end of file; (TCP only) otherwise SOCKET_ERROR. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. Section Error Codes further describes each error. This function calls function recv internally. For secure sockets, the received data is decrypted.
|