- The LIGHTWEIGHT, FAST and PRIVACY FOCUSED chatting program
- p.s. communications are transmitted as plaintext
-
xorg-X11
libX11-dlevel
libXcursor-dlevel
libXrandr-dlevel
libXinerama-dlevel
-
wayland
wayland-dev
orwayland-deval
-
OpenGL
mesa-libGL-dlevel
- Install required libraries
sudo yum install wayland-devel.x86_64 libxkbcommon-devel.x86_64 mesa-libGL-devel.x86_64
-
Zig version at least
0.12.0
-
SERVER
zig build server -- <subcommand>
- CLIENT
zig build client -- <subcommand>
- The server portion of the application that handles communication between multiple client instances
- Communication between server and client is achived through the use of
TsockM.Protocol
- Protocol definition:
[type]::[action]::[status]::[origin]::[sender_id]::[src]::[dst]::[body]
[type]
defines the protocol type:REQ
: request protocolRES
: response protocolERR
: error protocol
[action]
defines the action the protocol is performingCOMM
: establishing a communication socketCOMM_END
: terminate the communication socketMSG
: message handlingGET_PEER
: when pinging a peerNTFY_KILL
: reporting termination of a peer
[status]
defines the status code of the program (based on HTTP status codes)OK
: 200BAD_REQUEST
: 400NOT_FOUND
: 404METHOD_NOT_ALLOWED
: 405,BAD_GATEWAY
: 502,
[origin]
defines the status code of the program (based on HTTP status codes)CLIENT
: protocol comes from the client appSERVER
: protocol comes from the serverUNKNOWN
: I don't know from where the protocol is comming from :)
[sender_id]
defines some unsigned integer value- Used when communicating the
sender id
value - Used when communicating the
error code
of an error protocol
- Used when communicating the
[src]
defines the source of the protocol- TBA
[dst]
defines the destination address of the protocol- TBA
[body]
text data- used for sending a variaty of plaintext(for now) data
- {FEAT} encrypt body of the protocol
- {FEAT} store messages
- {FEAT} PeerPool v2
- Hash table approach
- {FIX} printing commands
- {TEST}
peer
- {UPDATE} make
Peer
more robust with more functions and quality of life things
- {TEST}
protocol
- {UPDATE}
core.zig
rename toserver.zig
- {TEST}
actioner
- {UPDATE} make
Protocol
more robust with more functions and quality of life things - {FIX} report unknown argument
- {FEAT} ERROR protocol sent when peer was ping that does not exist
- {FEAT} Introduce server commands
- {FEAT} Introduce server actions
- {FEAT}
:mute
and:unmute
server commands
- {FEAT} Server strcture
- {FEAT} Consume program arguments:
--log-level <level>
... specify log level to be used
- {UPDATE} introduce
thread_pool
- {UPDATE} transform functions to be camel case as per zig standrad
- {UPDATE} transform variables to be snake case as per zig standrad
- {UPDATE} Unwrap Protocol structure file
- {UPDATE} Unwrap Peer structure file
- {BUG} notifying peer death does not work every time
-
peerFindUsernameMatch
find all peers with specific username
- send a notification to client when a peer gets terminated
- Test message coloring
-
:info
action for printing server stats (amount of peers connected, uptime, server-address, etc.) -
:ping <peer_username>
action for pinging the status of a peer - Thread shared data - Mutex and shared data between threads
- Send periodic peer health check protocol ~ look for dead peers and remove them from the pool
- Executable commands on the server application
* [x]
KILL <peer_id>
- removes a specific peer * [x]KILL_ALL
- removes all peers * [x]LIST
- prints relevant peer data * [x]CC
- Clear screen - Accept address as a variable when launching a server
- Protocol should also contain
src
anddest
IP addresses, socket form - Peer unique hash as ID
- Handle invalid action arguments
KILL
- action must be provided with eather<peer_id
orall
, error otherwise
- Application given to the user for chatting
- {FEAT} decrypt body of the protocol
- {UPADTE} removed depricated code
- {FEAT} custom messeging commands like
\c{RED};HELLO\
that applies special properties to text\b;HELLO\
prints bold text\u;HELLO\
prints underlined text\c{#00FFAA};HELLO\
prints colored text based on hex value
- {FEAT} Client commands
-
:ping
~ ping user by username and print user info
-
- {FEAT} keybind list screen that shows all keybinds and their functionality
- {UPDATE}
Input-Box
report when switching betweenselection
andinsert
mode - {UPDATE}
Input-Box
report deletion of text - Introduce tests
- {FEAT} InputBox should have cursors
-
SelectionCursor
move around text -
InsertCursor
place where char should be appended
-
- {FEAT} Unit tests
- {BUG} when a message is sent to the server the server responds with
OK
, this should not be printed - {BUG} message input box not in bounds (overflows)
- {BUG} client should respond with
OK
onping
??
- {UPDATE}
INSERT
mode for input-box - {UPDATE} selection cursor movement ~ not all text selected at once
- {UPDATE} Client FPS inforamtion
- {FEAT}
SimplePopup
multiposition support - {UPDATE} clean up and make popup hanling more robust
- assert
popup.text.len > 0
, popups with no text should not be allowed
- assert
- {BUG} input filed click detection too high for
server_ip_input
- {BUG} only two popups are displayed at a time, there should be more
- {BUG} when
tab
is pressed and no ui element is selected the client crashes (LoginScreen) - {BUG} when client uses
:close
and reconnects and sends a message two messages are sent
- {UPDATE}
localhost
is a validserver_ip_input
string that is mapped to127.0.0.1
- {FEAT}
:close
command that disconnects from the server and returns to the login screen - {UPDATE}
Input-Box
should hold font data to be used within the input box - {UPDATE}
Input-Box
should hold sizing information of the client - {FEAT}
Input-Box
copying selected text support
- {UPDATE} Replace succesful connection screen with a popupdon't crash the the client wait for a connection to the server be available
- {UPDATE} Input box should accept placeholder "ghost" text
- {UPDATE} Input box should accept a label
- {UPDATE} Switching active input using the TAB key inside
LoginScreen
- {UPDATE} TAB key enables messaging input if it is disabled
MessagingScreen
- {UPDATE} If no port is specified in
server_ip_input
assume port6969
- {FEAT}
CTRL A
combination selects whole input box text - {UPDATE} when
x
is pressed the selected text gets deleated - {UPDATE} when
enter
orspace
is pressed the exitselection mode
- {UPDATE} when
CTRL C
is pressed exitselection mode
- {UPDATE} don't allow login if login name is empy or ip is not defined
- {UPDATE} ask for server ip before login
- {UPDATE} report connection request blocked (unsuccessful conection)
- {FEAT} server termination handler (bad-request::collectError)
- {UPDATE} Multicolor support for message display
-
SimplePopup
-
Message
-
- {UPDATE} make
Action
andCommand
a shared library between server and client src code - {UPDATE} finish implementaton of
:exit
action ~ handle COMM_END response
- {FEAT} popups for warnings and errors
- {FEAT} clipboard paste support
- {FEAT}
ClientScreen
~ groups of related render/functionality code-
LoginScreen
-
MessagingScreen
-
- {FEAT} print client termination
- {FEAT} Introduce
ClientActions
- bad-request-action
- comm-action
- comm-end-action
- get-peer-action
- msg-action
- ntfy-kill-action
- {FEAT} Introduce
ClientCommands
- {FIX} when exiting duuring
connection succesful
the program deadlocks - {FEAT} consume
-fp
for setting location to the font - {FEAT} consume
-F
start parameter to set scaling factor of the window - set client address source when sending things to the server
- {FEAT} read server adddress as program argument
- Consume peer termination notification and print it on screen
- Test message coloring
- Accept address as a variable when connecting a server
- Use Mutex to share
should_exit
state betweenread_cmd
andlisten_for_comms
-
:info
command to print information about the client instance
- Raylib.zig: https://github.com/Not-Nik/raylib-zig