summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic_streams.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/quic/ngx_event_quic_streams.c')
-rw-r--r--src/event/quic/ngx_event_quic_streams.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic_streams.c b/src/event/quic/ngx_event_quic_streams.c
index a4f4cb57c..69c7220cf 100644
--- a/src/event/quic/ngx_event_quic_streams.c
+++ b/src/event/quic/ngx_event_quic_streams.c
@@ -1470,3 +1470,31 @@ ngx_quic_update_flow(ngx_connection_t *c, uint64_t last)
return NGX_OK;
}
+
+
+ngx_int_t
+ngx_quic_handle_read_event(ngx_event_t *rev, ngx_uint_t flags)
+{
+ if (!rev->active && !rev->ready) {
+ rev->active = 1;
+
+ } else if (rev->active && (rev->ready || (flags & NGX_CLOSE_EVENT))) {
+ rev->active = 0;
+ }
+
+ return NGX_OK;
+}
+
+
+ngx_int_t
+ngx_quic_handle_write_event(ngx_event_t *wev, size_t lowat)
+{
+ if (!wev->active && !wev->ready) {
+ wev->active = 1;
+
+ } else if (wev->active && wev->ready) {
+ wev->active = 0;
+ }
+
+ return NGX_OK;
+}