?
Solved

Telnet Server

Posted on 1998-08-18
5
Medium Priority
?
235 Views
Last Modified: 2010-04-01
I'd like to know how I can make a Multi user CHAT telnet server ( LINUX ). I know kinda how the commands socket(), accept(), bind(), and listen() work, but how would i be able to get multiple users to be able to connect at one time and send strings from one console to another. a very simple chat server would be VERY much appreciated.
0
Comment
Question by:TRM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
jdyer earned 200 total points
ID: 1170650
Download the file:

http://www.foobar.co.uk/~simon/net/files/multi.c

It will get you rolling very fast. There is very little modification that needs to be made, and it is relatively well commented! There is a warning that the code is not fully functional. I compiled it and it ran the first time without modification (he's just protecting himself).

This should help alot, I hope so. If you need more info, let me know!

Regards,
  jdyer
0
 
LVL 6

Expert Comment

by:WxW
ID: 1170651
Once your server listens to a port , accept() returns a socket AND the port is STILL listening . That means that you can accept() as many connections as you want . But you will have to figure how the information and the messages you will receive will be forwarded to all connected users .
0
 
LVL 1

Expert Comment

by:jdyer
ID: 1170652
well WxW the OS often times limits the number of connections that can be opened. I think on most Lynix implementations it is 400 per socket. But that might be a little off.

Regards,
  jdyer
0
 
LVL 6

Expert Comment

by:WxW
ID: 1170653
Hmmm I am not sure but since Linux has more history as a UNIX platform , it would not allow less sockets to be created than WinSock .... Anyway you may have right
0
 

Author Comment

by:TRM
ID: 1170654
Thank you all VERY much. This will help me alot.
ty
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question