Hi,
I'm writing a simple udp client using sockets. My code looks like
this:
initServer2 = new Socket(AddressF amily.InterNetw ork, SocketType.Dgra m,
ProtocolType.Ud p);
initServer2.Con nect(IPAddress. Parse(Propertie s.Settings.Defa ult.InitServerA ddress),
Properties.Sett ings.Default.In itServerPort);
initServer2.Sen d(Encoding.ASCI I.GetBytes("REG ISTER2PORT-" +
userName));
initServer2.Rec eive(buffer);
initServer2.Con nect(IPAddress. Any, 0);
initServer2.Rec eive(buffer);
First I connect my socket to a specified ip and port, then I send and
receive data. next thing I want to do is opening the same socket that
it can accept every incoming package.
Everything works fine under Windows Vista, but when I run it under
Windows Xp I get an SocketException from line:
initServer2.Con nect(IPAddress. Any, 0); that the requeste address is
not valid in its context: 0.0.0.0:0.
Someone knows what is wrong with that code?
Thanks for any help