<< Previous | Index | Next >>

sock_recv_from


int sock_recv_from( sock_type *s, long *hisip, word *hisport, char *buffer, int len );

Description

After a UDP socket is initialized with udp_open() and sock_recv_init(), sock_recv_from () scans the buffers for any datagram received by that socket and identifies the remote host's address.

This function is not available starting with Dynamic C 7.05 (see Section 3.5).

Parameters

s

Pointer to UDP socket.

hisip

IP of remote host, according to UDP header.

hisport

Port of remote host.

buffer

Buffer to put datagram in.

len

Length of buffer.

Return Value

>0: Length of datagram received.
 0: No datagram.
-1: Receive buffer was not initialized with sock_recv_init().

Library

DCRTCP.LIB

See Also

sock_recv, sock_recv_init


TCP/IP Manual
Vol 1
<<Previous | Index | Next>> rabbit.com