Re: rr_tcp_listener_new connection.

[email protected] (Jonas Borgström) 02 Dec 2002 14:16:57 +0100
Newsgroups gmane.network.beep.roadrunner.general
Message-ID <[email protected]>
Francis Brosnan Bl=E1zquez <[email protected]> writes:

> Hi.
>=20
Hi,

> I'm trying to develop a server using Road Runner but when I run
> simple-server test it only accepts inbound connections from localhost.
>=20
> So, I started to determine what this code really does and finaly I have
> found the following line in rr_tcp_listener_new function:
>=20
> /* 	saddr.sin_addr.s_addr =3D INADDR_ANY; */
>         memcpy(&saddr.sin_addr, haddr, sizeof(struct in_addr));
>=20
> Therefore, the simple-server will only accept inbound connections from
> "haddr" and in this case "localhost".
> Why does road runner do this? and how can I make a server that accept
> inbound connections from anywhere?
>=20

Use "0.0.0.0" instead of "localhost" to accept connections from anywhere=20
(all interfaces).

/ Jonas
--=20
Jonas Borgstr=F6m                  [email protected]
CodeFactory AB                   http://www.codefactory.se/
Office: +46 (0)90 71 86 14