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

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!
 
L

Lau Lei Cheong

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)...
 
L

Lau Lei Cheong

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
 
S

smerf

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).
 
S

smerf

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.)
 
D

Dana

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.
 
P

Peter Duniho

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
 
B

Ben Voigt

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).
 
T

teslar91

Smerf,

You can still easily find the Hamachi software on any of the
peer-to-peer file sharing networks, with eMule, Kazaa, Morpheus, etc.
 
S

smerf

Not the server side. Hamachi sold out to LogMeIn.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top