socket_recvfrom

(PHP 4 >= 4.1.0, PHP 5)

socket_recvfrom -- Receives data from a socket, connected or not

Description

int socket_recvfrom ( resource socket, string &buf, int len, int flags, string &name [, int &port] )

警告

本函数暂无文档,仅有参数列表。

socket_recvfrom() has been binary safe since PHP 4.3.0


add a note add a note User Contributed Notes
tsuna at tsunaquack d0t c0m
22-Feb-2005 07:17
This function is very handy when dealing with UDP connections, because it enables you to know who's the client who connected to your socket. Bear in mind that UDP doesn't care about the source of the connection, the packets may be annonymous or even faked. No check is required.

If you want to listen on an UDP socket and answer to the client, read my comment on socket_listen() -> http://www.php.net/manual/en/function.socket-listen.php