Commit graph

22 commits

Author SHA1 Message Date
syeopite
53f31fd94c
Revert "Update recieve function to read full data from socket at once"
This reverts commit a3d2458c28.
2021-06-09 15:52:46 -07:00
syeopite
db4f73c25c
Revert "Merge pull request #7 from tenpura-shrimp/processconns5"
This reverts commit 3aab3dd7f1, reversing
changes made to cb01d0fbb8.
2021-06-09 15:50:15 -07:00
Andrew Zhao
a3d2458c28 Update recieve function to read full data from socket at once
The existing code reads each message from the socket individually and calls
engine_process_conns after each message. This seems inefficient as it leads
to excess calls engine_process_conns.

This changes the code that reads from the socket to read all available messages
before calling engine_process_conns based off of the logic in the reference
implementation.

reference: https://github.com/litespeedtech/lsquic/blob/master/bin/test_common.c#L737
2021-02-10 00:13:36 -05:00
Andrew Zhao
c965e0a380 Implement engine_process_connections timer
The previous code did not have an implementation to set timers for processing
connections. This leads to an occasional deadlock where process_connections
must be called to continue. This change implements this timer modelled after
the lsquic reference implementation.

Reference: https://github.com/litespeedtech/lsquic/blob/master/bin/prog.c#L535
2021-02-10 00:13:36 -05:00
vhuynh3000
5ef544c1bd Remove the ensure block and close the socket only if there is no exception so that exception during reads do not leave an engine running with no socket. 2020-10-22 21:44:58 -07:00
Van Huynh
4855742c45
close socket when the connection is closed (#2)
Close socket when the connection is closed
2020-10-16 08:41:24 +00:00
Omar Roth
96a75aae05
Update to latest version of lsquic 2020-07-19 11:42:57 -04:00
Omar Roth
5261034c0d
Update UA 2020-05-25 12:51:25 -05:00
Omar Roth
392a57aa8f
Update to latest version of lsquic 2020-05-20 12:00:38 -05:00
Omar Roth
e9db6c73b5 Keep reference so GC doesn't collect stream_ctx 2019-12-14 16:06:12 -05:00
Omar Roth
bc101423fa Fix binding for IPv6 2019-11-28 08:56:01 -05:00
Omar Roth
32aee44d8e Add support for specifying family 2019-11-27 11:53:14 -06:00
Omar Roth
1f7c9c652f Catch closed stream in readf 2019-11-24 14:24:45 -05:00
Omar Roth
50041fa046 Use buffered write 2019-11-24 13:57:21 -05:00
Omar Roth
016f733109 Replace IO::FileDescriptor with IO::ChanneledPipe 2019-11-24 13:22:08 -05:00
Omar Roth
0c0d8748a7 Catch exception in on_close 2019-11-23 18:16:28 -05:00
Omar Roth
aa94a6ea1b Catch exception in on_read 2019-11-23 18:11:54 -05:00
Omar Roth
7f2ecbfcdc Handle engine in separate fiber 2019-11-23 17:35:46 -05:00
Omar Roth
7c0ade984c Change default user-agent 2019-11-18 14:49:28 -05:00
Omar Roth
b84cc84aa1 Fix local variable stream_ctx 2019-11-16 14:50:07 -05:00
Omar Roth
a50712f308 Fix require 2019-11-16 14:42:28 -05:00
Omar Roth
6244230346
Add QUIC::Client 2019-11-16 14:07:48 -05:00