Re: Re-use an address/port when binding a socket used for Sending data
- From: "Gregory Hassett" <ghassett@xxxxxxxxxxx>
- Date: Wed, 18 May 2005 16:00:04 -0400
Well, for our purposes, we may consider the "packet" that I am sending to be
a short stream of data.
I am sending the stream to "punch" a TCP/IP "hole" to enable peer-to-peer
communication behind certain well-behaved routers. About 60% of routers
deployed today will respond to this technique; for the remaining 40% you
must fall back to a port-to-port relay server to achieve true disovery and
TCP/IP communication between peers that can communicate with a common
rendezvous server but each lie behind NAT'ted firewalls . You can learn
about this hole punching technique by reading section 4 of the excellent
paper at http://www.brynosaurus.com/pub/net/p2pnat/ -- it is widely used and
well-understood.
However, it requires that I periodically send a short stream from a known
local port. Hence I need to bind to a local port, send the stream, close
the socket, then re-bind a little while later (perhaps 30 seconds later).
Thanks!
-- Greg
"Eugene Gershnik" <gershnik@xxxxxxxxxxx> wrote in message
news:%23sbeZ19WFHA.3540@xxxxxxxxxxxxxxxxxxxxxxx
> Gregory Hassett wrote:
> > Hello,
> >
> > I want to periodically send a TCP packet to a peer, always from the
> > same source port.
>
> TCP is a stream protocol. It has no packets at least as far as TCP users
are
> concerned. If you need to periodically send something you open TCP stream
> and periodically write data to it.
> Perhaps if you would tell what you are trying to accomplish it would be
> possible to suggest some better way to do it.
>
>
> --
> Eugene
> http://www.gershnik.com
>
>
.
- Follow-Ups:
- 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: Phil Frisbie, Jr.
- 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-use an address/port when binding a socket used for Sending data
- Prev by Date: P2P PeerGraphShutdown throws exception on VS 2005
- Next by Date: Demand-dial App
- 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):
Relevant Pages
|