G
Guest
I am trying to send multicast messages using the following cod
Socket socket =new Socket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp)
socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, ttl)
socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(message.Address.Address))
The code throws a runtime error on line
{"An invalid argument was supplied"
ErrorCode 10022
The same code works fine in .NET Frmwrk
Socket socket =new Socket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp)
socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, ttl)
socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(message.Address.Address))
The code throws a runtime error on line
{"An invalid argument was supplied"
ErrorCode 10022
The same code works fine in .NET Frmwrk