> > PHP 5.1 will include a new function "stream_socket_listen" that will > > allow you manually listen(). The rationale for that is that you might > > want to alter some socket settings before actually accepting > > connections. Currently, there aren't any of these to configure, so it > > is low priority. > > Was this already added?
not yet. > > The UDP example reads only a single byte; check the specs for the > > daytime protocol to see how much it should read; if it isn't reading > > enough, that script might break. > > Quote (http://www.faqs.org/rfcs/rfc867.html): > "UDP Based Daytime Service > Another daytime service service is defined as a datagram based > application on UDP. A server listens for UDP datagrams on UDP port > 13. When a datagram is received, an answering datagram is sent > containing the current date and time as a ASCII character string (the > data in the received datagram is ignored)." > > Uhm, I think 1 byte is enough? Then is is worth noting the following in the recvfrom docs (excerpt from recvfrom(2)): If a message is too long to fit in the supplied buffer, excess bytes may be discarded depending on the type of socket the message is received from. This applies to datagram orientated sockets. --Wez.