Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Telnet Server

Posted on 1998-08-18
5
Medium Priority
?
237 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

636 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