Re: note 9575 added to Socket functions
| From: | paulwade at greenbush dot com | Date: | Mon, 13 Nov 2000 13:11:21 +0000 |
| Subject: | Re: note 9575 added to Socket functions | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-7633@lists.php.net to get a copy of this message | ||
Thanks. I tried it right away. getsockname works and getpeername segfaults
so I guess I really do need to look at the source.
On Sun, 12 Nov 2000, J. M. Castagnetto wrote:
> Date: Sun, 12 Nov 2000 23:31:33 -0800 (PST)
> From: "J. M. Castagnetto" <jcastagnetto@yahoo.com>
> To: paulwade@greenbush.com, php-notes@lists.php.net
> Subject: Re: [PHP-NOTES] note 9575 added to Socket functions
>
>
> Not completely correct. Look at the (still not
> documented) functions (from the PHP source code):
>
>
> int gethostbyaddr(string addr, string &name)
> Given a human-readable address, sets name to be
> the host's name
> int gethostbyname(string name, string &addr)
> Given a hostname, sets addr to be a
> human-readable version of the host's address
> int getpeername(int fd, string &addr[, int &port])
> Given an fd, stores a string representing
> sa.sin_addr and the value of sa.sin_port into addr and
> port describing the remote side of a socket
> int getsockname(int fd, string &addr[, int &port])
> Given an fd, stores a string representing
> sa.sin_addr and the value of sa.sin_port into addr and
> port describing the local side of a socket
>
> I will add the above to your note. Reading the PHP
> source code is always useful, before making an
> assertion.
>
>
> --- paulwade@greenbush.com wrote:
> > I filed a wishlist bug because I do not see any way
> > to get the IP address of the client. Until this is
> > added I would use caution in implementing servers
> > with PHP4. You can control access to selected ports
> > at the OS level with linux. It might be wise to
> > limit port access to specific machines or subnets.
> >
> > http://www.php.net/manual/ref.sockets.php
> >
> >
> > --
> > PHP Notes Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > php-notes-unsubscribe@lists.php.net
> > For additional commands, e-mail:
> > php-notes-help@lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin@lists.php.net
> >
>
>
> =====
> --- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Calendar - Get organized for the holidays!
> http://calendar.yahoo.com/
>
+----------------------------------------------------------------------+
+ Paul Wade Greenbush Technologies Corporation +
+ mailto:paulwade@greenbush.com http://www.greenbush.com/ +
+----------------------------------------------------------------------+