I have the following homework assignment that i need to complete
Instructions: Write a program in Java that uses sockets to act as a chat server.
Use the String[] args parameter of the main method to allow command-line entry of the listening socket. By default, the socket should be 23, but if a command-line argument is passed, open a socket on the appropriate port.
Your chat program should require a signon before entering the chat room. The signon should be a simple string, without any authentication (duplicate names are allowed).
When a user enters the chat room, a message should be sent to all existing users.
While in the chat room, anything typed (other than exit or quit) should be sent to all chat room users, except for the sender, along with a prefix of who sent the message. For example, if user “bif” types “hello”, all users except bif should then see “bif: hello”.
A command of “exit” or “quit” will cause the user to exit the chat room and be disconnected. A message should be sent to all other users in the chat room.
You can work in pairs on this project. You may help other students with hints on where to look in the book or the Internet to find information on socket programming, but all code should be the work of yourself or the pair you are working in.
You can test your program using telnet clients (available in Mac, Windows, and Linux OSs as standard utilities)
I have done a lot of research and basically know how to create sockets, servers, and clients. Im just not sure where to start or how to organize it. I know nothing about telnet. i need a really good tutorial or a basic diagram on how to implement the code such as: create a socket, connect using a server, type in words. I'm just not sure of the diagram i need to follow or what classes i need. any help would be greatly appreciated.
Instructions: Write a program in Java that uses sockets to act as a chat server.
Use the String[] args parameter of the main method to allow command-line entry of the listening socket. By default, the socket should be 23, but if a command-line argument is passed, open a socket on the appropriate port.
Your chat program should require a signon before entering the chat room. The signon should be a simple string, without any authentication (duplicate names are allowed).
When a user enters the chat room, a message should be sent to all existing users.
While in the chat room, anything typed (other than exit or quit) should be sent to all chat room users, except for the sender, along with a prefix of who sent the message. For example, if user “bif” types “hello”, all users except bif should then see “bif: hello”.
A command of “exit” or “quit” will cause the user to exit the chat room and be disconnected. A message should be sent to all other users in the chat room.
You can work in pairs on this project. You may help other students with hints on where to look in the book or the Internet to find information on socket programming, but all code should be the work of yourself or the pair you are working in.
You can test your program using telnet clients (available in Mac, Windows, and Linux OSs as standard utilities)
I have done a lot of research and basically know how to create sockets, servers, and clients. Im just not sure where to start or how to organize it. I know nothing about telnet. i need a really good tutorial or a basic diagram on how to implement the code such as: create a socket, connect using a server, type in words. I'm just not sure of the diagram i need to follow or what classes i need. any help would be greatly appreciated.