Benjamin Sergeant
d5d1a2c5f4
no default parameters for isReadyToWrite and isReadyToRead
2019-03-18 14:31:21 -07:00
Benjamin Sergeant
2a90e3f478
when trying to flush the send buffer, use select to wait until it is possible instead of using sleep to retry at a given frequency
2019-03-18 14:25:27 -07:00
Benjamin Sergeant
4f2babaf54
select interrupt cleanup
2019-03-14 18:37:38 -07:00
Benjamin Sergeant
977b995af9
replace uint8_t with uint64_t for the send/close requests types / use named variable to index into the _fildes array
2019-03-14 15:03:57 -07:00
Benjamin Sergeant
2750df8aa7
send can fail silently when sending would block (EWOULDBLOCK return for send) ( #18 )
...
* try to use a pipe for communication
* flush send buffer on the background thread
* cleanup
* linux fix / linux still use event fd for now
* cleanup
2019-03-13 23:09:45 -07:00
Benjamin Sergeant
9c3b0b08ec
Socket code refactoring, plus stop polling with a 1s timeout in readBytes while we only want to poll with a 1ms timeout
2019-03-04 13:40:15 -08:00
Benjamin Sergeant
fe7d94194c
readBytes does not read bytes one by one but in chunks
2019-03-02 21:11:16 -08:00
Benjamin Sergeant
d6c26d6aa8
create a blocking + cancellable Socket::readBytes method
2019-03-02 15:16:46 -08:00
Benjamin Sergeant
8a74ddcd13
create a blocking + cancellable Socket::readBytes method
2019-03-02 11:01:51 -08:00
Benjamin Sergeant
3a77e96a05
Feature/send large message ( #14 )
...
* introduce send fragment
* can pass a fin frame
* can send messages which are a perfect multiple of the chunk size
* set fin only for last fragment
* cleanup
* last fragment should be of type CONTINUATION
* Add simple send and receive programs
* speedups receiving + better way to wait for thing
* receive speedup by using linked list of chunks instead of large array
* document bug
* use chunks to receive data
* trailing spaces
2019-02-20 18:59:07 -08:00
Benjamin Sergeant
ee12fbdb5f
windows build fix
2019-01-27 10:46:02 -08:00
Benjamin Sergeant
316c630830
constexpr to declare number of fds
2019-01-26 21:01:36 -08:00
Benjamin Sergeant
1ea5db6110
linux fix
2019-01-26 20:57:48 -08:00
Benjamin Sergeant
986d9a00c0
remove shutdown call
2019-01-26 20:54:23 -08:00
Benjamin Sergeant
7a05a11014
rebase poll branch
2019-01-26 20:50:25 -08:00
Benjamin Sergeant
05033714bf
hearbeat
2019-01-24 12:42:49 -08:00
Benjamin Sergeant
1fa75d7fb2
check select errors better
2019-01-07 11:18:00 -08:00
Benjamin Sergeant
cc8a9e883e
unittest + compiler warnings
2019-01-05 21:10:08 -08:00
Benjamin Sergeant
50f4fd1115
int -> ssize_t for socker recv and send
2019-01-05 20:53:50 -08:00
Benjamin Sergeant
06d2b68696
header refactoring
2019-01-05 20:38:43 -08:00
Benjamin Sergeant
46d00360a8
unittest on appveyor
2019-01-04 17:28:13 -08:00
Benjamin Sergeant
af3df5e519
Socket::readLine works with arbitrary long lines
2019-01-03 18:47:01 -08:00
Benjamin Sergeant
d75753ec98
timeout is configurable
2019-01-03 18:33:08 -08:00
Benjamin Sergeant
cb904416c3
server unittest for validating client request / new timeout cancellation handling (need refactoring)
2019-01-02 16:08:32 -08:00
Benjamin Sergeant
239b5bc02c
refactoring + cancellation was buggy during http upgrade
2019-01-02 07:45:07 -08:00
Benjamin Sergeant
24c9e0abc3
can create a socket from a fd
2018-12-29 21:53:33 -08:00
Benjamin Sergeant
b34eccd749
non blocking dns lookup
2018-12-14 16:28:17 -08:00
Benjamin Sergeant
50b638f7fd
add cancellation support while connecting, to speed up WebSocket::stop
2018-12-09 17:56:20 -08:00
Benjamin Sergeant
5bf1b91528
http upgrade and connections use non blocking sockets
2018-12-09 14:07:40 -08:00
Benjamin Sergeant
c1ed83a005
stopping connection on Linux does not close the socket, which can create problem when re-starting the connection
2018-11-01 17:02:49 -07:00
Benjamin Sergeant
16805759d3
Windows support (no TLS yet)
2018-10-08 21:44:54 -07:00
Benjamin Sergeant
9b8d6cedfe
First import
2018-09-27 14:57:19 -07:00