Commit graph

109 commits

Author SHA1 Message Date
6e9efce7de Clean up client Listener with switch statement 2022-11-01 11:13:01 +01:00
d1c6f7df70 Implement unnamed semaphore for client 2022-11-01 10:55:53 +01:00
53c5712232 Add comments to Dispatcher 2022-11-01 09:39:55 +01:00
bbcc863b7f Add comments to cmd_send_message 2022-11-01 09:22:41 +01:00
7cde8c45c6 Fix message send 2022-11-01 02:03:46 +01:00
701656bb21 Fixing seg fault in send command 2022-10-31 23:35:01 +01:00
1f5164b51b Change display of list command 2022-10-31 23:34:24 +01:00
ba4f4b8aa7 Fix semaphore usage, TODO: use shared memory 2022-10-30 22:57:17 +01:00
bc3c44c37b Use unnamed semaphores 2022-10-30 00:43:54 +02:00
7533eca91c Add -pthread linking for semaphore use of client 2022-10-29 21:50:05 +02:00
62967f9543 Use semaphore instead of thread mutex for client 2022-10-29 21:37:28 +02:00
99f046e4ad Update TODO with semaphore instead of mutex 2022-10-29 20:20:01 +02:00
33e84b4e76 Add TODO for process mutex 2022-10-29 20:14:08 +02:00
d9ade5ef1c Call pthread_mutex_init in main, otherwise mutex has no interest 2022-10-29 20:12:06 +02:00
a648009b8c Add mutex for writing to stdout on the client 2022-10-29 20:11:57 +02:00
1a510f8086 Don't do error handling for send (Sender) 2022-10-29 19:58:37 +02:00
c93e56f254 Fix race condition on ClientListener and ClientSender threads
Threads were launched before the client details were registered
2022-10-29 19:45:25 +02:00
027a258ec3 Fix Dispatcher read from message_buffer 2022-10-29 19:18:34 +02:00
e3685f7885 For cmd_list_connected : if no client was found, tell the sender 2022-10-29 19:16:01 +02:00
db8ed83660 Fix ClientListener sending wrong buffer 2022-10-29 18:59:49 +02:00
1a3dea8c92 Add cmd_list_connected function 2022-10-29 18:58:49 +02:00
b6cbcd60c6 Rename function cmd_send to cmd_send_message 2022-10-29 18:30:14 +02:00
e67694d08f Clean up docstrings 2022-10-29 18:07:59 +02:00
74351f4283 Remove unused functions 2022-10-29 18:06:39 +02:00
9c50b8e3d1 Add TODO for Bad file descriptor 2022-10-29 17:54:31 +02:00
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