Commit graph

75 commits

Author SHA1 Message Date
ba5da7d534 Use recv with MSG_DONTWAIT instead of unblocking the socket 2022-10-28 10:57:13 +02:00
b28f9e46e5 Make client_sockid non blocking and handle the reading loops 2022-10-28 10:12:17 +02:00
9500e59f57 Minor docstring change 2022-10-28 08:15:20 +02:00
e693ad35c5 Let ClientListener send client_id to Dispatcher 2022-10-27 23:32:37 +02:00
69d0b56607 Add parser and send_message 2022-10-27 15:08:13 +02:00
283f4f2009 Start protocol definitions 2022-10-27 14:27:53 +02:00
14610a65af Rename pipe to make them more clear 2022-10-27 10:19:03 +02:00
41ee090ff3 Add TODO note 2022-10-27 10:01:26 +02:00
d447076265 Make stack gloabl, fix Dispatcher message processing 2022-10-27 10:00:58 +02:00
a8c71c6abd Remove unneeded libs 2022-10-27 09:55:28 +02:00
03e2cb1c8d Cleaning typo 2022-10-27 02:03:50 +02:00
890d327b5b Add Dispatcher 2022-10-27 02:03:28 +02:00
6c181cdbc4 Add Stack 2022-10-27 02:01:33 +02:00
5518f3eea7 Just send EOT to client for disconnect 2022-10-26 22:41:36 +02:00
80c5999a5a Declare disconnect_client function in header file 2022-10-26 22:38:19 +02:00
Tunui Franken
7e4a8bc707 Disconnect clients after server loop 2022-10-25 08:51:19 +02:00
Tunui Franken
39fde32fd6 Get client id before creating pipe: if client refused, no pipe created 2022-10-25 08:42:48 +02:00
d80cc79e8f Add disconnect_client function 2022-10-24 23:17:10 +02:00
acbdd0ed18 Add client threads to struct for client_details array 2022-10-24 23:14:05 +02:00
d3d5dbb700 Include header files in Makefile 2022-10-24 22:47:10 +02:00
d63d5538eb Handle args for server: use port in cli, PORT #ifdef, #else 0 2022-10-24 22:29:23 +02:00
a5712c52a4 Update architecture: say MessageBuffer instead of Stack (will be FIFO) 2022-10-24 22:16:42 +02:00
c7932e0b36 Handle args for client: use port in cli or default PORT 2022-10-24 22:12:39 +02:00
376b1a79f3 Add architecture 2022-10-21 17:33:08 +02:00
44f2df363a Create Dispatcher thread 2022-10-21 16:57:32 +02:00
75c916d6c2 Remove RUN global, doesn't work 2022-10-21 16:42:32 +02:00
8841e351d0 Add reading from pipe and sending to stream for ClientSender 2022-10-21 16:42:05 +02:00
dd7beccdf8 Remove obsolete service() function 2022-10-21 16:31:07 +02:00
d2983ff1d3 Handle client session ended by server 2022-10-21 16:08:24 +02:00
e18d002947 Add comments 2022-10-21 15:21:13 +02:00
cc5ccd053c Add client_id 2022-10-21 15:08:12 +02:00
8fcbc243b3 Add message_pipe 2022-10-21 14:20:32 +02:00
b2c3523d05 Add TODO 2022-10-21 14:19:52 +02:00
3a4259d6d9 Create client details in server loop, pass to threads 2022-10-21 14:03:10 +02:00
47ed9ddad8 Create struct for client_details, initialize global array containing these structs 2022-10-21 13:51:03 +02:00
f7695f764b Reword TODO 2022-10-21 13:29:55 +02:00
1414298846 Add TODO 2022-10-21 11:27:13 +02:00
d73ea75c69 Add client_sockid to thread argument 2022-10-21 11:17:25 +02:00
e0ea0473b5 Create threads, remove arguments 2022-10-21 11:05:39 +02:00
c7c662aa0f Create Dispatcher prototype 2022-10-21 10:28:23 +02:00
56217910c0 Add pipe for ClientSender, rename socket argument 2022-10-21 10:23:54 +02:00
5420a3b264 Use 'client_socket' instead of child_socket 2022-10-21 10:20:27 +02:00
d3312c2898 Add TODO 2022-10-21 10:01:40 +02:00
0a1738cc94 Start converting server to threading 2022-10-21 09:48:01 +02:00
e348410a3f Use sockid instead of fd 2022-10-19 23:10:57 +02:00
db9fbb9f22 Add #define for listening on loopback or 0.0.0.0 2022-10-19 22:55:51 +02:00
8a965787a2 Update docstrings in english 2022-10-19 22:55:41 +02:00
c378f71ced Indent preprocessor directives, it's not 1970 anymore 2022-10-19 22:29:51 +02:00
a0368d403b Remove unneeded includes 2022-10-18 23:15:29 +02:00
039182fef1 EOT works out of the box apparently 2022-10-18 22:43:04 +02:00