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. :)
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
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!
heh that was a much better answer than mine
how to write a code for a quick time player in java using udp and play a video streaming from the server .
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