28 Commits

Author SHA1 Message Date
1e3560014f Prevent deadlock when server is stopping (#426) 2023-02-25 14:41:05 -08:00
4420bc70b5 Revert "Export static symbols when building ws with shared library (#370)" (#383)
This reverts commit a3d2fa4b7e.
2022-04-12 08:55:43 -07:00
a3d2fa4b7e Export static symbols when building ws with shared library (#370) 2022-03-19 11:41:40 -07:00
74bb85efe9 Add getters (#327)
* Add getters for IXSocketServer class

* Add getters for IXHttpServer class

* Add getters for IXWebSocketServer class
2021-11-24 08:28:25 -08:00
461a645704 (ws) Implement simple header based websocket authorization technique to reject 2020-12-17 22:42:14 -08:00
93ad709dfd fix ws curl error message + some Windows warnings 2020-12-12 11:01:22 -08:00
73b9c0b89b (socket servers) merge the ConnectionInfo class with the ConnectionState one, which simplify all the server apis 2020-08-28 14:55:40 -07:00
cd4e51eacf (socket server) instead of busy looping with a sleep, only wake up the GC thread when a new thread will have to be joined, (we know that thanks to the ConnectionState OnSetTerminated callback 2020-08-15 16:24:35 -07:00
785842de03 (socket server) add a callback to the ConnectionState to be invoked when the connection is terminated. This will be used by the SocketServer in the future to know on time that the associated connection thread can be terminated. 2020-08-15 16:03:40 -07:00
261095fa12 (socket server) do not create a select interrupt object everytime when polling for notifications while waiting for new connections, instead use a persistent one which is a member variable 2020-08-15 15:28:15 -07:00
fbd17685a1 (socket+websocket+http+redis+snake servers) expose the remote ip and remote port when a new connection is made (see #222) / only ipv4 is handled 2020-07-08 12:10:35 -07:00
179e17895d unique_ptr for sockets 2020-03-24 12:48:55 -07:00
5d4bb90703 (SocketServer) add ability to bind on an ipv6 address 2020-01-26 16:21:56 -08:00
313949f087 SocketServer::handleConnection takes an std::shared_ptr<Socket> instead of a file descriptor 2019-09-30 21:48:55 -07:00
845bbc5208 all ws subcommands propagate tls options to servers (unimplemented) or ws or http client (implemented) (contributed by Matt DeBoer) 2019-09-30 18:21:20 -07:00
169e225ccd fix warning + add redis server logging 2019-09-23 21:14:20 -07:00
ceb0c602c9 Add simple Redis Server which is only capable of doing publish / subscribe. New ws redis_server sub-command to use it. The server is used in the unittest, so that we can run on CI in environment where redis isn not available like github actions env. 2019-09-23 21:04:01 -07:00
c65fec7271 clang format, based on cpprest 2019-05-30 08:46:50 -07:00
841cfe37dd server code / add dedicated thread to close/join terminated connection threads 2019-05-13 17:17:35 -07:00
a443bbdf80 Fix data races in DNSLookup (tsan) 2019-04-24 21:53:31 -07:00
26ee46b246 better server termination / another try at preventing thread join failures 2019-04-24 09:45:53 -07:00
52f460f66d (doc) Add more doc to SocketServer 2019-04-17 20:36:26 -07:00
d486c72e02 websocket server: closed connection threads are joined properly 2019-04-17 20:36:26 -07:00
bdfc55b951 Bug/30 server connection problem (#31)
* use threads instead of std::async, need to cleanup threads

* less buggy server connection per thread system
2019-04-16 22:19:44 -07:00
eac611ab1e Feature/connection state (#25)
* (cmake) add a warning about 32/64 conversion problems.

* fix typo

* New connection state for server code + fix OpenSSL double init bug

* update README
2019-03-20 18:34:24 -07:00
932bb732e0 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
2f9ad54bae gcc linux compile fix 2019-01-06 12:12:39 -08:00
57c22cddb8 make a class hierarchy for server code (IXWebSocketServer <- IXSocketServer) 2019-01-06 12:09:31 -08:00