Re: Re-use an address/port when binding a socket used for Sending data
- From: "Eugene Gershnik" <gershnik@xxxxxxxxxxx>
- Date: Wed, 18 May 2005 14:38:44 -0700
Gregory Hassett wrote:
> Well, for our purposes, we may consider the "packet" that I am
> sending to be a short stream of data.
Not really. You just want to establish a session.
> You can learn about this hole
> punching technique by reading section 4 of the excellent paper at
> http://www.brynosaurus.com/pub/net/p2pnat/
Ok. Note that it plays with things not officially supported by the API so
you cannot complain if something doesn't work.
In any case your code works almost fine on my machine XP SP2, .NET 1.1. If I
keep the Enter continuosly pressed I get your exception once in a while (1
in 50 I'd guess). This suggests that there is some timing problem which may
be platform dependant.
What OS are you using and what version of .NET framework?
The article you linked mentioned that "Windows hosts prior to XP Service
Pack 2, which did not correctly implement simultaneous TCP open". Maybe this
is the problem?
--
Eugene
http://www.gershnik.com
.
- Follow-Ups:
- Re: Re-use an address/port when binding a socket used for Sending data
- From: Gregory Hassett
- Re: Re-use an address/port when binding a socket used for Sending data
- References:
- Re-use an address/port when binding a socket used for Sending data
- From: Gregory Hassett
- Re: Re-use an address/port when binding a socket used for Sending data
- From: Eugene Gershnik
- Re: Re-use an address/port when binding a socket used for Sending data
- From: Gregory Hassett
- Re-use an address/port when binding a socket used for Sending data
- Prev by Date: Re: Re-use an address/port when binding a socket used for Sending data
- Next by Date: Re: Bandwidth Monitor
- Previous by thread: Re: Re-use an address/port when binding a socket used for Sending data
- Next by thread: Re: Re-use an address/port when binding a socket used for Sending data
- Index(es):