Sorry about the double creation. Changing the bind to 1234 does bind PART of
the local port 1234. If I issue a sendto as in my code Sendto(...,1234), the
actual setup of the packet from vb.net shows a send source port of 2011 and
a send dest port of 1234. which is only halfway correct, as verified by
windows network monitor. This is def. a BUG.
I am trying to do something simple. I send to a remote machine(nonwindows)
with a simple UDP packet. I used the code to send 2 bytes of data on port
9001. The remote receives the data but transmits a packet back to me on the
REAL send source port the VB program sent it on which is NOT 9001, it looks
like a windows assigned port. In fact the MSDN says it if you dont assign
the SEND SOURCE PORT for the packet , it will assign a port in the
2000-65535 range. VB is only setting the dest port part of the packet, not
the source send port part of it. I you actually fired the code off and
lookup at it with a sniffer, this happens every time. I am very
frustrated.Since windows is assigning a random port, I cant use the bind to
figure out what port to listen on. Using a sniffer it is easy to see this
bug, using MSDN code or mine, Ive tried several examples from MSDN with same
results.
Any more ideas?
Thanks BUC