Jump to content
Sign in to follow this  
Alcoholic

Peer2Peer Networks

Recommended Posts

Alcoholic

Hi everybody,

I want to write a chat program but I don't have a computer pernament connected to the Internet so that I can use

a server (.exe server program). In this http://en.wikipedia.org/wiki/Peer-to-peer page differences between server/client

& p2p networks are explained I think...

My question is if I can create a chat program without having to run a server all the time and how can I pass the IPs from

one computer to another? (would owning a website help? hosting there a server or something?)

Thanks.


I FEEL DEVOTION

Share this post


Link to post
Share on other sites
Airwolf

Hi everybody,

I want to write a chat program but I don't have a computer pernament connected to the Internet so that I can use

a server (.exe server program). In this http://en.wikipedia.org/wiki/Peer-to-peer page differences between server/client

& p2p networks are explained I think...

My question is if I can create a chat program without having to run a server all the time and how can I pass the IPs from

one computer to another? (would owning a website help? hosting there a server or something?)

Thanks.

You could use the TCP functions (see the help file) to create a listening port and a sending port for the client, then each machine would act as a server and a client.

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites
Alcoholic

You could use the TCP functions (see the help file) to create a listening port and a sending port for the client, then each machine would act as a server and a client.

Yes, but how can I get the ip address of the other client/server to connect to? I don't want the user to input the ip. Any ideas?

I FEEL DEVOTION

Share this post


Link to post
Share on other sites
Airwolf

Yes, but how can I get the ip address of the other client/server to connect to? I don't want the user to input the ip. Any ideas?

You could setup a list of machines in a file on a public server (and you can even encrypt the list using the _StringEncrypt function). Or, on a private network, you could scan an IP range or use Active Directory (if applicable). There are many different ways you can develop the application to find peers. Edited by Airwolf123

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites
JRowe

You could set up a simple relay system using php/mysql to store relevant data.

The relay system would handle logins, lists of logged in users, and user data, such as profiles, and friend groups. This would also avoid issues with dynamic IP addresses and so on, so that you could log in from any computer with your info.

Allow the client application to connect to other clients if Chat Requests are approved. Chat requests would be sent by the relay system, or queued until a person was logged in.

Setting a person as your friend would allow them to skip the chat request and initiate a session right away.

Security might be an issue, I'm not sure if it would be possible to execute code over a TCPSend after clients are connected.

Anyway, determine what data is necessary to validate a chat session, then abstract that data to the relay system. This way you avoid the possibility of losing sensitive data if the client gets hacked, and you will be able to distribute a much smaller, cleaner application. :)

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  

×