[Mono-winforms-list] No UDP broadcast messages received
sharkal
wolfgang.ginner at kapsch.net
Tue Nov 29 08:40:50 EST 2011
Hi,
i want to listen to a specific UDP port and receiving all messages, which
are sent on that port.
I only receive messages, which are sent directly to my IP address, but do
not receive messages, which are sent broadcast.
My openSuse is receiving the messages for sure, since i checked it with
wireshark, turned off the firewall and also can receive the messages, if i
do the same with python.
In Windows i can receive also the broadcast messages.
Any idea, how to deal with it?
The socket is configured something like this:
Socket clientSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp);
clientSocket.ReceiveBufferSize = 2 * 1024 * 1024;
clientSocket.Bind(localEndPoint);
clientSocket.BeginReceiveFrom(receivebuffer, 0, receivebuffer.Length,
SocketFlags.None, ref localEndPoint, OnReceiveCallback,
clientSocket);
clientSocket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.Broadcast, 1);
clientSocket.EnableBroadcast = true;
remoteIpAddress = IPAddress.Broadcast;
remoteEndPoint = new IPEndPoint(remoteIpAddress, ADMIN_PORT);
clientSocket.SendTo(sendbuffer, sendbuffer.Length, SocketFlags.None,
remoteEndPoint);
--
View this message in context: http://mono.1490590.n4.nabble.com/No-UDP-broadcast-messages-received-tp4119202p4119202.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
More information about the Mono-winforms-list
mailing list