Electric Type

Multimedia

About Us

News

Help

How to Write a Chat Server

Page 7 — What's Left?

Note that this server is intended as a starting point, not a finished product. If you want to run it on your own system, there's still a lot of work to do. Some things to add are:

  • Input buffering: I lied about the recv() function - it doesn't always receive a line at a time. A real chat server would need to append the results of recv() to a buffer and split it into lines by searching for line breaks.

  • Output buffering: If someone suspends their telnet process long enough, calling send() could block it. But select() can be used to find out whether a socket is ready for writing.

  • Proper support for the telnet protocol

  • Commands to get help, list who's in the room, and log out

  • Real user accounts with passwords

  • Multiple rooms

  • Squelching

  • Private chat

  • Etc., etc.



Tutorials Home  

CSS Reference  

Regular Expressions  

Image Filtering  

Adding Site Search  

Image Maps  

Browser Detection  

Fundamentals of XSSI  

FTP Tutorial  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.