Udp server receives too much data



I have a problem using udp client/server communication. After I send
some buffer to server, server always receives the buffer three times.
I doubt that this is an expected behaviour, so please someone tell me
what I'm doing wrong.

SERVER CODE
EndPoint endPoint = new IPEndPoint(IPAddress.Any, 9944);

Socket server = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp);
server.Bind(endPoint);
server.Poll(Timeout.Infinite, SelectMode.SelectRead);


CLIENT CODE
EndPoint endPoint = new IPEndPoint(IPAddress.Broadcast,
9944);

Socket client = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp);
client.EnableBroadcast = true;
client.SendTo(BitConverter.GetBytes(999), endPoint);


Thx!

.



Relevant Pages

  • Re: ... forbidden with client authentication scheme Anonymous
    ... Both the client and server use the same classes for WCF. ... A secure Host/Receiver is created as follows: ... // non-secure endpoint code not shown ... the server posts to the client's endpoint. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: ... forbidden with client authentication scheme Anonymous
    ... the service that is acting as the client is not setup as such. ... Both the client and server use the same classes for WCF. ... A secure Host/Receiver is created as follows: ... // non-secure endpoint code not shown ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: Getting 401 Access denied w/ Endpoint in SQL 2005 from C# client
    ... As for the SQL2005's endpoint SOAP webservice, ... we may need to check the client side code.... ... Getting 401 Access denied w/ Endpoint in SQL 2005 from C# ... the windows app is begin deployed to a Windows 2000 Server ...
    (microsoft.public.sqlserver.connect)
  • Re: WCF Service wont work when published
    ... application on my local workstation in debug mode. ... publish the service to a server and call that service from my test web ... something to do with the endpoint address, ... connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: MSCluster provider on non-clustered Exchange 2003 server.
    ... The error "There are no more endpoints available from the endpoint mapper." ... the client called a server endpoint ... I think this error makes sense in your scenario, since the Exchange 2003 ... server is not part of a cluster, the WQL query could not find an endpoint ...
    (microsoft.public.win32.programmer.wmi)