Commit graph

134 commits

Author SHA1 Message Date
c8ff665230 Use switch for ClientListener, ClientSender 2022-10-29 17:50:16 +02:00
821964c23d Minor fix for ClientListener and ClientSender, don't start n at 0 2022-10-28 17:38:51 +02:00
259b0b0149 Minor change for ClientSender 2022-10-28 17:35:43 +02:00
91dfb9414e Add mutex locks for ClientListener 2022-10-28 17:13:57 +02:00
3f44a3c363 Implement cmd_send 2022-10-28 17:02:43 +02:00
7494398b61 Fix disconnect bug 2022-10-28 16:09:29 +02:00
ec952a34d6 Use send instead of write, bzero out the buffer before reading 2022-10-28 13:28:52 +02:00
1bd4663edb Create function check_client_id 2022-10-28 11:30:55 +02:00
8d59920adc Add space after client_id sent to Dispatcher 2022-10-28 11:27:11 +02:00
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