| Age | Commit message (Collapse) | Author |
|
On each iteration of partial write ttb need to shift data it want to
send rather than try to resend whole buffer again
|
|
It was a bit inconsistent then
|
|
Since it is used in poll, no need for it to be non-blocking
Also, accept(2) actually has a lot of error codes, and its return value
should be checked
|
|
While generating, server socket must be added so it will be able to be
poll(2)ed
|
|
- There's no need for storing port and inaddr as separated variables
- res can be declared in line with peers
- Also, since POLL_WAITMS was removed, no need for checking poll for 0
|
|
This way it's also handled through poll, so no need for POLL_WAITMS
anymore
Though peers[0] is now reserved for server's socket, so server can
handle up to SOCKETS_MAX-1 sockets from now
|
|
- Don't make client sockets nonblocking as poll doesnt require this.
Hence, fcntl and errno are not needed there anymore
- Add ; after label cuz clang complains about variable declarations
after labels and blah blah
- Add checks for write(2) call to be sure that all data is sent
|
|
|