You're good if you can answer this one.....

  • Thread starter Thread starter smerf
  • Start date Start date
S

smerf

Don't ask why (it'll just make your head hurt - I know mine does just
thinking about the screwed up logic my manager has for this little
project)......but I need to be able to tunnel a TCP connection through a UDP
connection.

Any ideas how to do this? I am using VB.Net 2005 but I may be able to
follow a simple C# example or two.

Thanks!
 
UDP does neither guarantee the packets arrive the destination in order, so
you'd have to create your packet with index, implement a buffer for
reordering of packet on receiver side, design both connection endpoints to
allow resending packet if one is found lost (the missing packet doesn't
arrive before timeout) or after a full buffer condition is cleared (better
if you can signal the sending side to stop sending packet if the buffer is
full, but for the purpose of discussion, I think it's ok if the receiver
side simply drop the packets and ask for resend when the buffer is has been
emptied)

In short, you have to implement all the Transport Controls provided by
TCP(or I should say... OSI layer 4 - transport layer)...
 
Errata. :P

Lau Lei Cheong said:
UDP does neither guarantee the packets arrive the destination in order, so
UDP does neither guarantee the packets arrive the destination nor garantee
the packets arrive in order
 
Great links Dana!

Unfortunately Hamachi has sold out to LogMeIn and the server is no longer
available publicly....

The app we are adding to allready has a UDP connection between peers. The
thought behind tunneling TCP through it was to allow other apps to
successfully use the same tunnel (like Hamachi) and to take advantage of the
features of TCP when transferring files (making sure everything gets there
and in the proper order).
 
The app we are adding to allready has a UDP connection between peers. The
thought behind tunneling TCP through it was to allow other apps to
successfully use the same tunnel (like Hamachi) and to take advantage of the
features of TCP when transferring files (making sure everything gets there
and in the proper order).

If we could tunnel TCP thru UDP, our issue would be solved.

(We really need a newsgroup devoted to application programming questions -
design patterns, actual code swapping, etc. - ....not just languages.)
 
smerf said:
Great links Dana!

Unfortunately Hamachi has sold out to LogMeIn and the server is no longer
available publicly....

The app we are adding to allready has a UDP connection between peers. The
thought behind tunneling TCP through it was to allow other apps to
successfully use the same tunnel (like Hamachi) and to take advantage of the
features of TCP when transferring files (making sure everything gets there
and in the proper order).

You original post got me interested so I did a little search and that is
what I found.
I found some forum type boards where people were discussing doing what you
are trying to do, and that led me to Hamachi. You may want to do a search
for Hamachi and see if you find any help that way.
Sorry that is all I can offer.
 
smerf said:
(We really need a newsgroup devoted to application programming questions -
design patterns, actual code swapping, etc. - ....not just languages.)

There are, in fact, newsgroups dedicated to algorithm and coding issues, as
well as newsgroups dedicated to the use of TCP/IP. For the most part,
you're not going to find those newsgroups under the
microsoft.public.dotnet.* hierarchy.

I agree that your question is not on-topic here. IMHO, the solution is just
to find the right newsgroup and use that one, rather than cross-posting over
a number of wrong newsgroups.

Just because you're coding using .NET, C#, VB.NET or whatever, that doesn't
mean all programming questions you might have are .NET, C#, VB.NET or
whatever newsgroups.

Hope that helps...for what it's worth, while you may find an answer through
your excessive cross-posting to unrelated newsgroups, you are much more
likely to get exactly the advice you want if you take the time to find the
right newsgroup and post your question there. This isn't just about being
nice to the newsgroups...you will also have more personal success by being
nice to the newsgroups.

Pete
 
Lau Lei Cheong said:
UDP does neither guarantee the packets arrive the destination in order, so
you'd have to create your packet with index, implement a buffer for
reordering of packet on receiver side, design both connection endpoints to
allow resending packet if one is found lost (the missing packet doesn't
arrive before timeout) or after a full buffer condition is cleared (better
if you can signal the sending side to stop sending packet if the buffer is
full, but for the purpose of discussion, I think it's ok if the receiver
side simply drop the packets and ask for resend when the buffer is has
been emptied)

Which is exactly what the existing TCP/IP networking stack already does.

I would look at the winpcap library, which I know several programs use to
implement software ethernet bridging (in the days before XP, when Windows
didn't have that built in).
 
Smerf,

You can still easily find the Hamachi software on any of the
peer-to-peer file sharing networks, with eMule, Kazaa, Morpheus, etc.
 
Not the server side. Hamachi sold out to LogMeIn.

Not to worry though.....I'm almost ready to replace what Hamachi sold out.
 
Back
Top