Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Please, find the test task below and inform us about the time you need to complete it:
- Create a simple chat with CLI interface
- - Both client and server should be console apps. Users send messages to chat via stdin prompt
- - Users must specify their names when joining chat
- - Each message is broadcasted to all chat members
- - Same user (identified by same name) can have multiple simultaneous clients running.
- - Online status calculation: user is "online" when he/she has at least one client running, otherwise user is "offline".
- - Server must notify all chat members when some user comes online or goes offline.
- Example output:
- *** Alice is online
- *** Bob is online
- Alice: anybody home?
- Bob: hi
- *** Alice is offline
- - Client and server part should be written using Golang
- - Network protocol must be extensible. It should be possible to add new features in future.
- - Clean, readable code. Simplicity is a plus
- - All errors must be handled, some examples:
- - network failures
- - slow clients
- - invalid messages (like attempt to send message on behalf of other user)
- - etc
- Thank you and good luck! :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement