Re: ./EuGTK/GtkEngine.e to Irv
- Posted by jimcbrown (admin) Apr 22, 2015
- 1854 views
PeteE said...
Here's one way to do it without using ifconfig. It creates a UDP socket, multicasts a packet to itself, and returns the from address. No error checking.
Brilliant!
PeteE said...
constant setsockopt_ = define_c_func(-1, "setsockopt", {C_INT, C_INT, C_INT, C_POINTER, C_INT}, C_INT) sockets:set_option(sock, SOL_SOCKET, SO_REUSEADDR, 1) c_func(setsockopt_, {sock[1], IPPROTO_IP, IP_ADD_MEMBERSHIP, mreq, 12})
Ouch. Looks like we have a bug in set_option().