Hi,
yeah ext/sockets again :-)
The 5th param of socket_sendto() obviously cannot be a hostname
(string). socket_bind(), socket_connect() etc. allow this though.
So I am not sure wether it is wanted or not. But I guess it is :-)
For socket_sendto() though one would need to use
gethostbyname ("my.host.com") and use its returnvalue as the
5th param to socket_sendto() or directly use a dotted-decimal
notation.
chaning:
if (inet_aton(addr, &addr_buf) == 0) {
sin.sin_addr.s_addr = addr_buf.s_addr;
} else {
to (omitting "== 0"):
if (inet_aton(addr, &addr_buf) ) {
sin.sin_addr.s_addr = addr_buf.s_addr;
} else {
allows to use also hostname.
I read that inet_aton() returns a pointer to char and not 0
on success, so that might be the reason why it won't work like
the way it is momently.
As my karma is insufficent for these parts, maybe someone can make
the mini-fix again :-) ...maybe jason again? ...would be very kind.
thx and best regards
-moh
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php