Re: UDP support?
| From: | Gwilym Evans | Date: | Tue, 25 Apr 2000 00:29:22 +0000 |
| Subject: | Re: UDP support? | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-18168@lists.php.net to get a copy of this message | ||
Okay, thanks for the speedy reply. After some further investigation using
php4 rc1 I've been able to send a udp packet successfully (perhaps not
totally disabled?). I did read through the bug reports, someone saying that
it is not binary safe, from the looks of it I think only the bug status
itself was suspended.
Since the packet sending worked, lets assume the rest of the code you put in
is still active. The service I am trying to get a response from replies on a
different port from the one you sent from, always the same port number
though. To 'listen' on this port do I simply use another fsockopen, same ip
address but with the port as the port to listen to and consequently fread
from the resulting resource id?
( Gwilym )
----- Original Message -----
From: "Evan Klinger" <evan715@sirius.com>
To: "Gwilym Evans" <code@steelkey.com.au>
Cc: <php-dev@lists.php.net>
Sent: Tuesday, April 25, 2000 9:14 AM
Subject: Re: [PHP-DEV] UDP support?
> Gwilym Evans wrote:
> >
> > What is the status of UDP support in PHP? Last I saw of it was an update
> > that 'support' was added to fsockopen() in the php4b4 release, however I
> > have seen no documentation for it. Just that it's slightly confusing
since
> > there is nothing in the manuals about using udp, whereas the socket
> > information functions have the ability to tell whether a socket is tcp
or
> > udp.
>
> I hacked in UDP support awhile back but it was disabled as someone
> reported it not to work. I have looked over the code and I can't figure
> out what's wrong.
>
> > I would have thought a function to open a socket for udp purposes would
not
> > exactly be appropriate, since there is no connection to keep
established.
> >
> > ( Gwilym )
>
> You can connect() to a UDP socket, but it does have a different meaning
> than if it was a TCP socket. If the socket is UDP then it means the
> client (the one opening the connection) will only accept data from that
> remote host on that specific port.
>
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-dev-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
>
> ev
>
> ----------------------------
> Evan Klinger evan@php.net
> AIM evan715