[gnet-dev] specifying local address to bind to



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.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]