DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   Help with programming a chat program. (Urgent) (http://www.daniweb.com/forums/thread39155.html)

viperz_d Feb 4th, 2006 2:55 am
Help with programming a chat program. (Urgent)
 
Hello, I'm new here,
Can anyone help me? I'm trying to make a chat program. Like that of winchat. I'm planning something like a serverless type. Any help would be appreciated. :)

zillabunny Feb 6th, 2006 12:38 pm
Re: Help with programming a chat program. (Urgent)
 
ok first you'd need to establish a peer to peer connection
then you'd need to pass strings back and forth between that connection

hope that helps =P

AlanC Feb 6th, 2006 1:04 pm
Re: Help with programming a chat program. (Urgent)
 
Hi

You probably know all this already and forgive me if so but normally a central server manages the clients and connections; it's IP could be distributed with the clients and they then connect to the server rather than each other.

In a pure peer-to-peer network, which is what your serverless chat is, the clients (or, more correctly, peers) don't know who to connect to. So how do they discover each other? The obvious way is for peers to broadcast UDP packets (sent to 255.255.255.255), and listen for these from other peers. A list of IP's discovered can be maintained, and the user can then initiate direct TCP connections (on a different port) to one or more of these.

Here are some snags:
* UDP is a 'fire and forget' protocol- you don't how far your packet got.
* UDP broadcasts are normally blocked by firewalls, unless you explicitly open up the port for UDP (not recommended for security).

The good news is, the basic mechanism of text chat using the Winsock control is fairly easy.

Could be an interesting challenge!

Regards,
AlanC

zillabunny Feb 6th, 2006 1:17 pm
Re: Help with programming a chat program. (Urgent)
 
heh that was a much better answer than mine

kenny.ganta Apr 30th, 2008 4:55 pm
Re: Help with programming a chat program. (Urgent)
 
how to write a code for a quick time player in java using udp and play a video streaming from the server .

CzechRock3 May 1st, 2008 12:39 pm
Re: Help with programming a chat program. (Urgent)
 
If this is just for a small group of people using winsock you can have one person host a server then have your friends connect to that server with clients using winsock


All times are GMT -4. The time now is 1:36 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC