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
250665b92e
linux compile fix
2019-03-14 18:55:33 -07:00
Benjamin Sergeant
c9c657c07b
build fix
2019-03-14 18:53:21 -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
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
05033714bf
hearbeat
2019-01-24 12:42:49 -08:00
Benjamin Sergeant
4d587e35d8
windows compile fix
2019-01-05 21:02:55 -08:00
Benjamin Sergeant
50f4fd1115
int -> ssize_t for socker recv and send
2019-01-05 20:53:50 -08:00
Benjamin Sergeant
46d00360a8
unittest on appveyor
2019-01-04 17:28:13 -08:00
Benjamin Sergeant
474985e784
split handshake code into its own files, so that Transport file is less massive
2019-01-02 20:07:54 -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
09af729c07
g++ build fixes
2018-10-01 14:46:11 -07:00
Benjamin Sergeant
9b8d6cedfe
First import
2018-09-27 14:57:19 -07:00