From 78516f4167eeba4670e4cbb15d9e16e3392c4163 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 17 May 2024 14:32:02 -0700 Subject: [PATCH] docs --- src/snake/http/BaseHTTPRequestHandler.hx | 2 +- src/snake/socket/BaseServer.hx | 3 +++ src/snake/socket/StreamRequestHandler.hx | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/snake/http/BaseHTTPRequestHandler.hx b/src/snake/http/BaseHTTPRequestHandler.hx index fe18649..a702f79 100644 --- a/src/snake/http/BaseHTTPRequestHandler.hx +++ b/src/snake/http/BaseHTTPRequestHandler.hx @@ -66,7 +66,7 @@ class BaseHTTPRequestHandler extends StreamRequestHandler { /** The version of the HTTP protocol we support. - set this to HTTP/1.1 to enable automatic keepalive + Set this to `"HTTP/1.1"` to enable automatic keepalive. **/ public static var protocolVersion:String = "HTTP/1.0"; diff --git a/src/snake/socket/BaseServer.hx b/src/snake/socket/BaseServer.hx index 31a8915..0a222f8 100644 --- a/src/snake/socket/BaseServer.hx +++ b/src/snake/socket/BaseServer.hx @@ -66,6 +66,9 @@ class BaseServer { /** Stops the `serveForever()` loop. + + Blocks until the loop has finished. This must be called while + `serveForever()` is running in another thread, or it will deadlock. **/ public function shutdown():Void { __shutdownRequest = true; diff --git a/src/snake/socket/StreamRequestHandler.hx b/src/snake/socket/StreamRequestHandler.hx index 36a3a03..962a06e 100644 --- a/src/snake/socket/StreamRequestHandler.hx +++ b/src/snake/socket/StreamRequestHandler.hx @@ -7,7 +7,7 @@ import sys.net.Socket; import haxe.io.Input; /** - Define self.rfile and self.wfile for stream sockets. + Define `rfile` and `wfile` for stream sockets. **/ class StreamRequestHandler extends BaseRequestHandler { /**