Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6477655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:58:31+00:00 2026-05-25T06:58:31+00:00

I need to send a file to a user behind a router. I know

  • 0

I need to send a file to a user behind a router. I know I can do this with a tcp connection if he enables port forwarding on his router. I want to avoid this in order to make my application easier to use for my users. So I been trying to do tcp punch holing and that is almost impossible. I managed to do udp puch holing.

if you already know what udp punch holing is, then you may skip this part:

so what I did in order to establish a connection between two users that happen to be behind a router was. user 1 talks to a server that has a WAN ip address via the udp protocol. user 2 also does the same thing. ok so now the server knows the remote end point of each user. the server now sends user 2 the info of user 1. server notifies user 1 that user 2 has received the info. user 2 then sends packages to the router ip address of user 1. the packages received by that router get forwarded to user 1 because they come from the port specified by the server. so know all the packages that user 2 sends to the router of user 1 will get to user 1 if they are sent through the port that was specified by the server. when the packages arrive to user 1 those packages arrive with user 2 info. user 1 now know how to send data two user 2 as well.

So now I am able to send data between two users that happen to be behind distinct routers. The reason why I used the udp protocol was because it is similar to tcp when using c#. I been trying to do this with tcp but I just cannot make it work. this application that I am crating is written in c# and everything works great when users happen to be behind the same router. but know I want to extend the functionality.

So now I finally got my first step on connecting two clients behind a different nat. the only problem is that the only way I managed to do this was with the upd protocol. I been reading that upd does not ensure the delivery of data and also that data may be received on a different order.

Maybe I can create an algorithm in order to be able to send data via udp knowing that data will not be lost.

another alternative is to use a different protocol such as ftp, bittorrent… etc. I don’t know if it will be possible to do ftp punch holing though.

so in short I just want to be able to enable two peers that are behind distinct routers to be able to communicate with the help of a server. I do not want to communicate through ralying (connection goes from client A to server to client B) because sometimes it get’s difficult to manage and it is expensive to maintain when a lot of users use it. Maybe I should use a different protocol such as a bittorrent library and I haven’t done that because I haven’t find a good example on the internet that shows you how to use that library.


  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:58:32+00:00Added an answer on May 25, 2026 at 6:58 am

    http://nutss.gforge.cis.cornell.edu/stunt.php

    It’s caller STUNT.

    Simple Traversal of UDP Through NATs and TCP too (STUNT), which extends STUN to include TCP functionality, is a lightweight protocol that allows applications running behind a NAT to determine external IP and port-binding properties, packet filtering rules and various timeouts associated with TCP connections through the NAT. Knowing these parameters allows applications to establish TCP sessions between two NAT’ed hosts. As a result P2P and other applications can work through existing NAT infrastructure without sacrificing the benefits of TCP.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to send a CSV file in HTTP response. How can I set
I need to build a system that a user will send file to the
I need to send a file to MobileMe via Cocoa. I stumbled across a
Dear friends, I need your help. I need to send .bmp file to another
HI I have an xml file with 500KB size which i need to send
I am opening a file which has 100,000 URL's. I need to send an
I have an XML file which I need to parse using PHP and send
I need send certain attributes(say, human readable user name) from server to client after
I have a pdf file on disk that i need to send to a
I have a database file I need to send to a PHP controller for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.