Jano Svitok
10/16/2006 10:47:00 PM
On 10/17/06, Michael Hall <logarkh@gmail.com> wrote:
> Okay I'm looking to make a basic chat program that I can connect to via
> telnet for learning purposes.
>
> I want a user to connect then login in or be able to create a new user,
> new users would be saved as files. then when they're in the program they
> can talk on different channels by typing "channel1 <message>" or
> "channel2 <message>" etc. Also I'd like to put the code in different
> files i.e. connection/login/user create code in one file, the
> channel/talk functions in another and in a third file a list of the
> commands that can be typed pointing to the function name (like
> {"<command", function_name} so that when they type the command that's
> listed there it will find the correct function and run it) I need help
> on how to go about this, psuedo code, code examples etc.
Have a look at Socket::TCPServer in stdlib. That would be the base for
your server.