Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 UDP Chatroom
Index -> Programming, C++ -> C++ Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Panopticon




PostPosted: Sun Aug 06, 2006 12:09 am   Post subject: UDP Chatroom

A quick and dirty Windows console-based chatroom with UDP. Useful if you're on a network that bans conventional instant messenging protocols.

Fast HOWTO:
1. Compile. Make sure you have a recent version of Windows.
2. Run the server on one computer
3. Run the client on other computers. Connect to server computer by entering its IP address and the port that the server is running on (UDP 12345)
4. Type stuff. Press 'enter' to send messages. Message '/exit' to log off, '/close' to shutdown the server.

TODO:
- The program doesn't handle the error-prone nature of UDP very well: it occasionally crashes when multiple users send messages at the exact same time.
- No *nix support. The program is compiled with the Winsock library and uses Windows API console functions to change cursor position, text colour, etc.
- No permissions system: any connected user can shutdown the server.
- Current method of relaying messages and keeping track of connected clients is stupid and ridiculous.


Will post detailed instructions and code explanation at later time.



xi_UDPserver.c
 Description:
Server program

Download
 Filename:  xi_UDPserver.c
 Filesize:  3.74 KB
 Downloaded:  640 Time(s)


xi_UDPclient.c
 Description:
Client program

Download
 Filename:  xi_UDPclient.c
 Filesize:  8.13 KB
 Downloaded:  1020 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Quakerstate98




PostPosted: Wed Mar 26, 2008 8:46 am   Post subject: (No subject)

hmm, can't seem to get your download to work
md




PostPosted: Wed Mar 26, 2008 11:51 am   Post subject: RE:UDP Chatroom

The download is hosted by compsci.ca, so it should work just fine - infact it works fine for me.

Panopticon Since I lack windows and I am currently too busy to look at the code, how does your protocol work?

It should be pretty trivial to get multiple messages at once - even messages spread out over multiple packets.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: