Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PHP-DOC] cvs: phpdoc /en/reference/stream constants.xml /en/reference/stream/functions stream-s
> Hey Nuno,
>
> A couple of comments:
>
> The LISTEN flag is used to actually "switch-on" a
> connection-orientated transport (eg: TCP) so that it can accept
> connections.
>
> So that sentence should read something like:
>
> "Connection-orientated transports (such as TCP) must use this flag,
> otherwise the server socket will not be enabled.  Using this flag for
> connect-less transports (such as UDP) is an error."

OK, I'll change that.


> 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?


> Rather than saying "this function doesn't work with UDP sockets", you
> should say "it is an error to use this function with UDP sockets",
> because the function itself isn't broken or deficient; using it with
> UDP sockets is an error in your code.

I'll change this too. And maybe turn <note> into <warning>.


> 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?


Thanks for your comments!

Nuno


> On Sat, 31 Jul 2004 11:48:38 -0000, Nuno Lopes <nlopess@php.net> wrote: 
http://cvs.php.net/diff.php/phpdoc/...10&r2=1.11&ty=u[c
olor=darkred] 
phpdoc/en/reference/stream/constants.xml:1.11 
11:20:48 2004 
<function>stream_socket_server</function> 
to start 
this flag. 
include this flag. 
http://cvs.php.net/diff.php/phpdoc/.../>
r2=1.3&ty=u 
phpdoc/en/reference/stream/functions/stream-socket-accept.xml:1.2
phpdoc/en/reference/stream/functions/stream-socket-accept.xml:1.3 
Thu Apr  1 01:31:14 2004 
Sat Jul 31 07:48:38 2004 
http://cvs.php.net/diff.php/phpdoc/...
&r2=1.16&ty=u 
phpdoc/en/reference/stream/functions/stream-socket-server.xml:1.15
phpdoc/en/reference/stream/functions/stream-socket-server.xml:1.16 
Wed Jun 16 09:01:22 2004 
Sat Jul 31 07:48:38 2004 
is 
<constant>STREAM_SERVER_LISTEN</constant>. 
<constant>STREAM_SERVER_BIND</constant> as 
connections 
STREAM_SERVER_BIND); 
STREAM_SERVER_BIND); 

Report this thread to moderator Post Follow-up to this message
Old Post
Nuno Lopes
07-31-04 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Documentation archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:33 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.