From 03fb94100d60490705250d4d05ccf8a2d98351b3 Mon Sep 17 00:00:00 2001 From: c-cube Date: Tue, 2 Apr 2024 18:38:30 +0000 Subject: [PATCH] deploy: d8ff243e8d1079a3fbdd2d6324b0e4a51cd6be35 --- .../Server/module-type-UPGRADE_HANDLER/index.html | 8 +++----- tiny_httpd/Tiny_httpd_ws/index.html | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tiny_httpd/Tiny_httpd_core/Server/module-type-UPGRADE_HANDLER/index.html b/tiny_httpd/Tiny_httpd_core/Server/module-type-UPGRADE_HANDLER/index.html index fe0d9e6f..3c881c7d 100644 --- a/tiny_httpd/Tiny_httpd_core/Server/module-type-UPGRADE_HANDLER/index.html +++ b/tiny_httpd/Tiny_httpd_core/Server/module-type-UPGRADE_HANDLER/index.html @@ -1,7 +1,5 @@ -UPGRADE_HANDLER (tiny_httpd.Tiny_httpd_core.Server.UPGRADE_HANDLER)

Module type Server.UPGRADE_HANDLER

Handler that upgrades to another protocol.

type handshake_state

Some specific state returned after handshake

val name : string

Name in the "upgrade" header

val handshake : unit Request.t -> (Headers.t * handshake_state, string) result

Perform the handshake and upgrade the connection. The returned code is 101 alongside these headers. In case the handshake fails, this only returns Error log_msg. The connection is closed without further ado.

val handle_connection : +UPGRADE_HANDLER (tiny_httpd.Tiny_httpd_core.Server.UPGRADE_HANDLER)

Module type Server.UPGRADE_HANDLER

Handler that upgrades to another protocol.

  • since NEXT_RELEASE
type handshake_state

Some specific state returned after handshake

val name : string

Name in the "upgrade" header

val handshake : Unix.sockaddr -> - handshake_state -> - IO.Input.t -> - IO.Output.t -> - unit

Take control of the connection and take it from ther.e

+ unit Request.t -> + (Headers.t * handshake_state, string) result

Perform the handshake and upgrade the connection. This returns either Ok (resp_headers, state) in case of success, in which case the server sends a 101 response with resp_headers; or it returns Error log_msg if the the handshake fails, in which case the connection is closed without further ado and log_msg is logged locally (but not returned to the client).

val handle_connection : handshake_state -> IO.Input.t -> IO.Output.t -> unit

Take control of the connection and take it from ther.e

diff --git a/tiny_httpd/Tiny_httpd_ws/index.html b/tiny_httpd/Tiny_httpd_ws/index.html index b19fefa3..64ad2d05 100644 --- a/tiny_httpd/Tiny_httpd_ws/index.html +++ b/tiny_httpd/Tiny_httpd_ws/index.html @@ -1,6 +1,6 @@ Tiny_httpd_ws (tiny_httpd.Tiny_httpd_ws)

Module Tiny_httpd_ws

Websockets for Tiny_httpd.

This sub-library (tiny_httpd.ws) exports a small implementation for a websocket server. It has no additional dependencies.

Websocket handler

val upgrade :