Basically I want multiple users to connect to a server via telnet and to type commands to server...

however, when I log the user onto the server I only seem to be able to capture one character at a time...

So instead of the user being able to type:

help

what the server gets is:

h
e
l
p

now this might just be basic stuff, but how can I set up the program so it will accept user input? and at the same time know which user it is comming from?

Sliver

ps. I'm sorry if this isn't the most clear question -- I'm really new at this
Posted on 2002-01-28 17:32:44 by Sliver
You might be getting a char at a time. You might be getting two.
You might be getting <whatever>. It is your decision to think of a
protocol... to make it simple, buffer all input from a user until you
hit buffer length, or get a CR or LF. Then accept that as user input.

As for differencing between users, each connection to the
server will have a unique socket.
Posted on 2002-01-28 17:48:56 by f0dder