title: How to UDP send and receive on same port?
body: <p>I need to be able to send and receive UDP packets on the same port.
  I am able to listen, on say port 5000, but my send uses a random high port.
  The system I am working written in VB with does this and my need is to write a UDP responder for debugging various protocol issues.</p>
  
  <p>I am using the Open Source C++ Sockets Library from <a href="http://www.alhem.net" rel="noreferrer">http://www.alhem.net</a> (Anders Hedstrom) and have been able to use the UdpSocket::Bind() to receive incoming UDP packets using the virtual function UdpSocket::OnRawData(), but have been unable to cause the UdpSocket::Open() (calls connect) to make the UdpSocket::Send() use the port chosen in Bind() (it uses random high number port instead).</p>
  
  <p>Moving the Open() function doesn't help. I have posted a request on their forum - but believe from what I have read that it should be possible to do this, and I'm probably not understanding how to use UDP.</p>
  
  <p>Does anyone have any ideas on what I should try?<br>
  --thanks--</p>