github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/vendor_skip/nhooyr.io/websocket/doc.go (about) 1 // +build !js 2 3 // Package websocket implements the RFC 6455 WebSocket protocol. 4 // 5 // https://tools.ietf.org/html/rfc6455 6 // 7 // Use Dial to dial a WebSocket server. 8 // 9 // Use Accept to accept a WebSocket client. 10 // 11 // Conn represents the resulting WebSocket connection. 12 // 13 // The examples are the best way to understand how to correctly use the library. 14 // 15 // The wsjson and wspb subpackages contain helpers for JSON and protobuf messages. 16 // 17 // More documentation at https://nhooyr.io/websocket. 18 // 19 // Wasm 20 // 21 // The client side supports compiling to Wasm. 22 // It wraps the WebSocket browser API. 23 // 24 // See https://developer.mozilla.org/en-US/docs/Web/API/WebSocket 25 // 26 // Some important caveats to be aware of: 27 // 28 // - Accept always errors out 29 // - Conn.Ping is no-op 30 // - HTTPClient, HTTPHeader and CompressionMode in DialOptions are no-op 31 // - *http.Response from Dial is &http.Response{} with a 101 status code on success 32 package websocket // import "nhooyr.io/websocket"