package polymarket

  1. Overview
  2. Docs
On This Page
  1. Types
  2. Handshake
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Websocket.HandshakeSource

WebSocket handshake implementation (RFC 6455 Section 4).

Performs HTTP/1.1 Upgrade handshake directly over a TLS flow.

Types

Sourcetype result =
  1. | Success
  2. | Failed of string
    (*

    Handshake result

    *)

Handshake

Sourceval perform : flow:Tls_eio.t -> host:string -> port:int -> resource:string -> result

Perform WebSocket handshake over a TLS flow.

Sends the HTTP Upgrade request and validates the server's response, including verification of the Sec-WebSocket-Accept header.