sockets - UDP broadcast of WCF Service address -


I have a WS2008R2-server and a W7-client lab-environment in VMware. I WCF-service from the server I am trying to broadcast -address and receive it in the client. I am using System.Net.Sockets in C # .NET and I can successfully send data to the server. I at least look ok with WinDump but when I try to get it on the client it fails. I did not understand where the problem is ..? The client can communicate with the server in other ways and with my WCF service if I enter my address manually. I have started my firewall in the lab-environment.

[Update]

I checked WinDump on my client-VM and the same e-mail has been shown here, well, they seem to be able to get the broadcast. But why receiver form-method is not returning anything? Have I incorrectly setup a customer socket? Should it be tied to any address or its local IP? Neither works ...

[/ update]

Here is the server-code:

  public stable class multicast server {static socket Socket; Fixed IPEndPoint EP = new IPEDpoint (IPAD Broadcast, 9050); Public static void Open () {socket = new socket (Address Family.Inter Network, SocketType.Dgram, ProtocolType.Udp); Socket.Setcocurection (socket optionalvell socket, socket option name. Broadcast, true); } Send Public Static Zero (String Message) {socket.SendTo (Encoding. ASCII.GetBytes (Message), AP); } Public static zero closed () {socket.Close (); }}  

and customer:

  public static class multicast client {public static string reception () {socket socket = new socket (Address Family.InterNetwork, SocketType .Gram, Protocol type. UPS); Ipdpoint ap = new ipadpoint (ipadress annie, 9050); Socket.Bind (EP); Byte [] data = new byte [1024]; Endpoint E = (Endosyas) AP; Int i = socket.ReceiveFrom (Data, Ref e); Socket.Close (); Return encoding ASCII.GetString (data, 0, i); }}  

I'm not sure where your current problem is, but read your question I immediately knew that you are changing a wheel to upgrade and use NAT 4.0 which is fine for this purpose - the contract given on the basis of services and UDP-based search for service with the UDP. Apart from this, it is based on the WS Discovery Protocol, so I think it should be interoperated. Is not it better than a custom solution?


Comments