Women in Technology

Hear us Roar



Article:
  Client/Server Rendezvous on the LAN
Subject:   Having multiple ServicePublisher on one pc not possible
Date:   2004-09-01 06:32:28
From:   DeepDiver
Response to: Having multiple ServicePublisher on one pc not possible

SOLUTION:


in the ServiceProvider use AdvUdpClient instead of UdpClient


impl for AdvUdpClient:

public class AdvUdpClient : System.Net.Sockets.UdpClient
{
public AdvUdpClient( int port )
{
this.Client.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.ReuseAddress,1);
this.Client.Bind( new IPEndPoint(IPAddress.Any, port) );
}
}