1. Pedro Ferreira
  2. chat

Source

chat /

Filename Size Date modified Message
Client
Images
Sources
Static
Views
40 B
5 B
2.9 KB
505 B
24 B
1.1 KB
109 B
1.2 KB
230 B

Try it out

http://chat4321.herokuapp.com/

Image

Build

Command Description
swift package update Update all dependencies to latest version.
swift build && .build/debug/chat Build and run the server.
tsc -w Compile the typescript files.

Dependencies

Messages

Note: | is the pipe character, but isn't being rendered correctly in bitbucket.

Client

Message Description
U|(username) Tells you what is your username.
C|(connectedCount) Tells you the number of connected users at the moment.
M|(time)|(username)|(message) Received a message.
J|(username) A user joined the chat.
L|(username) A user left the chat.

Server

Message Description
R A client is ready, send his username and the last chat messages.
M|(username)|(message) Received a message.