Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm wondering how skype can send files directly to users that are usually behind a firewall? How does this work since I need to develop something similar where one local webserver (behind a firewall) needs to be able to send/stream files directly to another identical one?

I understand there needs to be some kind of publicly accessible central server through which both discover each other, and I plan to have that one, but how does the direct connection happen after that?

Thanks

share|improve this question

closed as off topic by Nifle, Renan, Mokubai, Canadian Luke, Diogo Aug 2 '12 at 20:16

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
    
Thanks, that's great! Hopefully, i can find a Python library to simplify this. Cheers! –  Rok Aug 2 '12 at 12:48

1 Answer 1

up vote 9 down vote accepted

Skype does not rely on a server to send files per se. Skype uses a technique called hole punching to allow communication behind two restrictive firewalls. In essence, it will open a communication channel, thus "punching a hole" through the local firewall, which the other Skype client can use to transfer data.

Skype's communication is almost entirely based on peer-to-peer, therefore no centralized server is needed for the actual data transfer. It however needs a supernode to make the initial communication.

A NAT router therefore keeps tables of which internal computer has communicated with which external computer and which ports the two have used. The trick used by VoIP software consists of persuading the firewall that a connection has been established, to which it should allocate subsequent incoming data packets.

So, basically, the communication looks like this:

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.