digitalmars.D - Multicast support within std.socket
- Evan Davis (6/6) Dec 17 2013 Hello all,
- Rob T (16/22) Dec 17 2013 You should be able to use Socket.setOption to set any socket
Hello all, I've been looking into how to create a multicast packet using std.socket, and I found that std.socket doesn't support the socket option IP_ADD_MEMBERSHIP. Should I be using IPv6 for all of my multicast needs? -Evan Davis
Dec 17 2013
On Tuesday, 17 December 2013 at 21:21:09 UTC, Evan Davis wrote:Hello all, I've been looking into how to create a multicast packet using std.socket, and I found that std.socket doesn't support the socket option IP_ADD_MEMBERSHIP. Should I be using IPv6 for all of my multicast needs? -Evan DavisYou should be able to use Socket.setOption to set any socket option that is not specifically listed in std.socket. The option enum value IP_ADD_MEMBERSHIP is available in the following lower-level modules: std.c.linux.socket std.c.osx.socket std.c.windows.winsock To access the correct enum value, import the required module for whichever OS you are using. You'll also have to do a cast of the value as follows: cast(SocketOption)IP_ADD_MEMBERSHIP This solution is of course far from ideal, but it is a workable temporary solution until std.socket is improved. I suggest that you file a bug report on this issue https://d.puremagic.com/issues/enter_bug.cgi --rt
Dec 17 2013