***second  sending  as  the  first mail ssems to never reach the mailing


I am working on something like (very old project using applicatons for
which I have not the sources):

-  Create Server UDP socket port 0 (Winsock select the listening port
itself) and do .Listen

- I retrieve port number using GetSockName/.sin_port

-  I  create  a client socket to connect to an other machine but I set
LocalPort  with  same  socket  number  as  the one retrieved by server

-  I  .Connect the client to other machine and .Send the data, and all
is  fine,  the  machine  on  the other side receive UDP packet and the
application  now  to  which port it has to send data back (that is the
way it works and I can't change this).

All  works  fine on my XP dev machine but the program must finally run
on  NT4  and  once  I  try on it,I get WSAEADDRINUSE ( 10048 ) Address
already in use.

So I tried to understand and it seems it has something to deal with
Port usage not Addr really.

Now if i set LocalPort to 0 before .Connect then all is fine of course
because NT4 will select its own free port for sending.

Any  idea  why  NT4  do not accept localport for UDP sending to be set
with  same number has a listening server port on same machine/ip ? May
be an old NT4 Winsock limitation ?

I know NT4 is old but I have to work on a very old server that can't
be upgraded. May be some of you remember such limitation ?


To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to