Re: [gnet-dev] specifying local address to bind to
- From: David Helder <dhelder umich edu>
- To: <wroberts1 home com>
- Cc: <gnet-dev gnetlibrary org>
- Subject: Re: [gnet-dev] specifying local address to bind to
- Date: Wed, 18 Apr 2001 19:42:25 -0400 (EDT)
On Wed, 18 Apr 2001 wroberts1 home com wrote:
> I notice that gnet_udp_socket_port_new() always binds to address
> INADDR_ANY. I have an instance where there are multiple network
> interfaces on the same machine on the same subnet (like ip aliasing).
> In this case INADDR_ANY might choose to bind to an interface you
> dont want it to.
>
> What do you think of a gnet_udp_socket_port_new() where you pass
> a GInetAddress* to set both the local address and port to bind
> socket to?
>
> My mind is comming from the
> java.net.DatagramSocket(int port, InetAddress laddr) constructor,
> where you can bind a udp socket on a specified local port & address.
I have no problem with it. We have this:
gnet_tcp_socket_server_new2 (const GInetAddr* iface, gint port);
in CVS. I could add a similar gnet_udp_socket_port_new2.
David
--
__ _ __ David Helder - University of Michigan
___/ /__ __ __(_)__/ / dhelder umich edu
/ _ / _ `/ |/ / / _ / http://www.eecs.umich.edu/~dhelder
|_,_/|_,_/|___/_/|_,_/ Jungle Monkey: http://www.junglemonkey.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]