Commit graph

27 commits

Author SHA1 Message Date
root
44cf92c998 fix: read(2)ing too many bytes 2025-05-17 09:07:03 +00:00
root
c90622c564 fix: client__pollout always returning error, not handling error 2025-05-17 08:46:26 +00:00
root
76b53ad30c fix: negative line length, write(2) to bad fd 2025-05-17 08:37:23 +00:00
root
65dc844f54 typo: writing buffer_len to somewhere undefined 2025-05-17 08:27:15 +00:00
root
05f614b224 typo: writing POLLOUT beyond pollfds array bounds 2025-05-17 08:20:30 +00:00
root
cbde04fc7c client__pollin diagram 2025-05-17 08:15:07 +00:00
root
484d81baa8 client__pollin: read as much as possible; client__pollout: do processing 2025-05-17 08:10:55 +00:00
root
8ab750ba97 bugfix: removing pollfds[0] actually removed pollfds[-1]
this bug created this weird behaviour:

1. client 1 connects
2. client 2 connents
3. client 1 disconnects
4. client 2 sends a line
5. client 2 is disconnected by the server
2025-05-13 12:22:36 +00:00
root
29f54ba779 echo server, multiple clients, lines <256 bytes 2025-05-13 12:07:03 +00:00
root
d54596514c echo then close connection 2025-05-11 08:22:07 +00:00
root
60e9bcf95c todo: error conditions 2025-05-07 14:35:20 +00:00
root
d69183c0d1 simplify pollfd deletion: by index 2025-05-07 14:32:00 +00:00
root
f096cb00e7 say goodbye to clients then close socket 2025-05-07 14:21:07 +00:00
root
1cf28e9565 bugs 2025-05-07 13:57:04 +00:00
root
72b9f421e1 loop pollfds: only checking server for now 2025-05-07 13:35:04 +00:00
root
9f3d59cf15 separate into files 2025-05-07 11:38:56 +00:00
root
0038b22aca poll(2) in a loop 2025-05-07 10:35:00 +00:00
root
08f4db4d2b poll(2) on the server socket; pollfds array 2025-05-07 10:30:14 +00:00
root
5c129207ae constants.c: sizeof int and short 2025-05-07 08:04:01 +00:00
root
d190827141 small fix: copying 8 bytes at once 2025-05-04 15:24:55 +00:00
root
80ecf726e7 nonblocking socket 2025-05-04 15:22:34 +00:00
root
fbd0c7735b c header files constants 2025-05-04 15:11:31 +00:00
root
44d1729d94 unlink existing socket file 2025-05-04 14:50:45 +00:00
root
e3ab67013e bind to unix socket 2025-05-04 14:48:36 +00:00
root
e855248606 makefile 2025-05-04 11:26:20 +00:00
root
1f0adc0a69 hello world 2025-05-04 11:19:41 +00:00
root
f15e3f33c2 gitignore 2025-05-04 11:18:19 +00:00