kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 681e3b2b6e45024c56a924b97faa8b251cc0afdc
parent 542c0f1a298e5d1ef3bcea1e293f92832f51ded1
Author: Joris Vink <joris@sanctorum.se>
Date:   Mon, 10 Feb 2025 13:59:29 +0100

sse example: set http_timeout to 0.

Diffstat:
examples/sse/src/sse.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/examples/sse/src/sse.c b/examples/sse/src/sse.c @@ -61,6 +61,7 @@ page(struct http_request *req) int subscribe(struct http_request *req) { + struct connection *c; struct sse_state *state; char *hello = "event:join\ndata: client\n\n"; @@ -103,6 +104,10 @@ subscribe(struct http_request *req) http_response_header(req, "content-type", "text/event-stream"); http_response(req, 200, NULL, 0); + /* Kill HTTP timeouts. */ + c = req->owner; + c->http_timeout = 0; + return (KORE_RESULT_OK); }