Ignore socket events when an HTTP response is being built by the user

This commit is contained in:
2025-12-03 18:40:26 +01:00
parent f6d81c1a87
commit e686e477e2
5 changed files with 64 additions and 0 deletions
+6
View File
@@ -481,6 +481,9 @@ typedef struct {
// Native socket events that need to be monitored
int events;
// If this is set, the raw socket handle shouldn't be monitored
bool silent;
// Generation counter to invalidate any SocketHandle
// referring to this socket when it is freed.
// Note that this counter may wrap but always skips
@@ -668,6 +671,9 @@ void socket_set_user(SocketManager *sm, SocketHandle handle, void *user);
// writing.
bool socket_ready(SocketManager *sm, SocketHandle handle);
// When a socket is marked as silent it will not generate events
void socket_silent(SocketManager *sm, SocketHandle handle, bool value);
////////////////////////////////////////////////////////////////////////////////////////
// src/byte_queue.h
////////////////////////////////////////////////////////////////////////////////////////