21 lines
6.5 KiB
HTML
21 lines
6.5 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ws` mod in crate `actix_http`."><meta name="keywords" content="rust, rustlang, rust-lang, ws"><title>actix_http::ws - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../actix_http/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module ws</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>actix_http</a></p><script>window.sidebarCurrent = {name: 'ws', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/actix_http/ws/mod.rs.html#1-315' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>actix_http</a>::<wbr><a class="mod" href=''>ws</a></span></h1><div class='docblock'><p>WebSocket protocol support.</p>
|
||
<p>To setup a <code>WebSocket</code>, first do web socket handshake then on success
|
||
convert <code>Payload</code> into a <code>WsStream</code> stream and then use <code>WsWriter</code> to
|
||
communicate with the peer.</p>
|
||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||
<table><tr class='module-item'><td><a class="struct" href="struct.CloseReason.html" title='actix_http::ws::CloseReason struct'>CloseReason</a></td><td class='docblock-short'><p>Reason for closing the connection</p>
|
||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.Codec.html" title='actix_http::ws::Codec struct'>Codec</a></td><td class='docblock-short'><p>WebSockets protocol codec</p>
|
||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.Parser.html" title='actix_http::ws::Parser struct'>Parser</a></td><td class='docblock-short'><p>A struct representing a <code>WebSocket</code> frame.</p>
|
||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.Transport.html" title='actix_http::ws::Transport struct'>Transport</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||
<table><tr class='module-item'><td><a class="enum" href="enum.CloseCode.html" title='actix_http::ws::CloseCode enum'>CloseCode</a></td><td class='docblock-short'><p>Status code used to indicate why an endpoint is closing the <code>WebSocket</code>
|
||
connection.</p>
|
||
</td></tr><tr class='module-item'><td><a class="enum" href="enum.Frame.html" title='actix_http::ws::Frame enum'>Frame</a></td><td class='docblock-short'><p><code>WebSocket</code> frame</p>
|
||
</td></tr><tr class='module-item'><td><a class="enum" href="enum.HandshakeError.html" title='actix_http::ws::HandshakeError enum'>HandshakeError</a></td><td class='docblock-short'><p>Websocket handshake errors</p>
|
||
</td></tr><tr class='module-item'><td><a class="enum" href="enum.Message.html" title='actix_http::ws::Message enum'>Message</a></td><td class='docblock-short'><p><code>WebSocket</code> Message</p>
|
||
</td></tr><tr class='module-item'><td><a class="enum" href="enum.OpCode.html" title='actix_http::ws::OpCode enum'>OpCode</a></td><td class='docblock-short'><p>Operation codes as part of rfc6455.</p>
|
||
</td></tr><tr class='module-item'><td><a class="enum" href="enum.ProtocolError.html" title='actix_http::ws::ProtocolError enum'>ProtocolError</a></td><td class='docblock-short'><p>Websocket protocol errors</p>
|
||
</td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||
<table><tr class='module-item'><td><a class="fn" href="fn.handshake.html" title='actix_http::ws::handshake fn'>handshake</a></td><td class='docblock-short'><p>Verify <code>WebSocket</code> handshake request and create handshake reponse.</p>
|
||
</td></tr><tr class='module-item'><td><a class="fn" href="fn.handshake_response.html" title='actix_http::ws::handshake_response fn'>handshake_response</a></td><td class='docblock-short'><p>Create websocket's handshake response</p>
|
||
</td></tr><tr class='module-item'><td><a class="fn" href="fn.hash_key.html" title='actix_http::ws::hash_key fn'>hash_key</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.verify_handshake.html" title='actix_http::ws::verify_handshake fn'>verify_handshake</a></td><td class='docblock-short'><p>Verify <code>WebSocket</code> handshake request.</p>
|
||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "actix_http";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |