Jump to content
Sign in to follow this  
tom13

Sending files with P2P (TCP?)

Recommended Posts

tom13

Hi,

I want to exchange files between computer A and computer B using a peer to peer system. Should this be done using TCP, and if so, how? If not, then what is the best option?

Best regards,

Tom

Share this post


Link to post
Share on other sites
tom13

not possible with autoit maybe?

Share this post


Link to post
Share on other sites
CHronologist

I think using TCP functions is always like peer-to-peer since you connect two computers at their IPs.

You need to create a GUI where your Client and Host enter the IP used.

If you want to know how to use TCP there are several posts in this forum like this one from AutoIT Smith:

http://www.autoitscript.com/forum/index.php?showtopic=18738

And concerning file exchange there is a UDF by GTAspider that can help you by writing your programm:

http://www.autoitscript.com/forum/index.php?showtopic=46341

Share this post


Link to post
Share on other sites
tom13

Tcp isn't peer to peer. Peer to peer means client to client. Tcp is server to client

Is it possible to make a peer to peer program with AutoIT then?

Share this post


Link to post
Share on other sites
monoceres

You could always try and implement the bit torrent protocol, here's a link


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
Kip

You could always try and implement the bit torrent protocol, here's a link

An application layer (http, ftp) is something else than a transport layer (tcp, udp).

Share this post


Link to post
Share on other sites
Jos

Tcp isn't peer to peer. Peer to peer means client to client. Tcp is server to client

This is not really a valid statement.

Peer-to-peer is different from Server-Client but both are using TCPIP. Peer-To-Peer says something about the role of each party in the connection.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Kip

Basisprincipe

Om een TCP-verbinding op te bouwen stuurt de client een TCP-pakket naar de server met de zogenaamde SYN-vlag.

van wikipedia Edited by Kip

Share this post


Link to post
Share on other sites
Jos

van wikipedia

Yes .. and ?

All P2p programs are using TCPIP that is not a question but a fact.

P2P really means that each machine connected has both a Server and a Client role and means everybody is eachothers "equal".

:)

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Kip

yeah, but if each computer is the server, then every computer should forward ports and that stuff.

When i start limewire, I don't have to open any ports.

Share this post


Link to post
Share on other sites
yucatan

Yes .. and ?

All P2p programs are using TCPIP that is not a question but a fact.

P2P really means that each machine connected has both a Server and a Client role and means everybody is eachothers "equal".

:)

hi jos nice explanetion(A) your totaly right :(

Share this post


Link to post
Share on other sites
Jos

yeah, but if each computer is the server, then every computer should forward ports and that stuff.

When i start limewire, I don't have to open any ports.

This implies you agree that IP is used since you talk about ports now.

Let me ask you this: Are you automatically sharing files when you start Limewire ?

In the Window "Overzicht" is the top part used for the downloads and the bottom part for the uploads.

The Port forwarding is only required when the party at the "outside" tries to connect back with a different port than you went out with. Your firewall will know all ports/session you initiated and as long as the program only uses those ports, things will work without any port mapping/forwarding.

Jos

Edited by Jos
typo's

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jos

I also see limewire uses UPnP to configure the router.

Could be too.. I haven't looked at the details of all ports used by the program.

Anyways, P2P is an Application and IP is a transport mechanism which both are totally separate things. Nicely defined in the OSI layer model :)

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Kip

An application layer (http, ftp) is something else than a transport layer (tcp, udp).

That's why I just said that to monoceres (a view posts back)

Share this post


Link to post
Share on other sites
tom13

So,

What would work is making an application that makes the current system both a server and a receiver?

Share this post


Link to post
Share on other sites
tom13

best way to do that is by using TCP?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×