38 lines
8.7 KiB
HTML
38 lines
8.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>WebSocketConnection (handy_http_websockets.connection.WebSocketConnection)</title>
|
|
<meta charset="utf-8" />
|
|
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
<link href="style.css" rel="stylesheet" />
|
|
<script src="script.js" type="text/javascript"></script>
|
|
|
|
|
|
<link href="search-results.html" rel="prefetch" />
|
|
</head>
|
|
<body>
|
|
<div id="page-header">
|
|
<div id="logotype">
|
|
<span>Documentation</span>
|
|
<nav>
|
|
<a href="http://dlang.org/">Dlang.org</a>
|
|
</nav>
|
|
</div>
|
|
|
|
<form action="search-docs.html" id="search">
|
|
<input name="searchTerm" placeholder="Find a symbol name..." type="search" />
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
</div>
|
|
<div id="page-body">
|
|
<div id="page-content">
|
|
<h1>WebSocketConnection</h1><div class="breadcrumbs"><a class="breadcrumb" href="handy_http_websockets.html">handy_http_websockets</a> <a class="breadcrumb" href="handy_http_websockets.connection.html">connection</a> </div><div><div class="documentation-comment synopsis"><div><p>All the data that represents a WebSocket connection tracked by the
|
|
<tt class="inline-code">WebSocketHandler</tt>.</p></div></div></div><div class="annotated-prototype"><div class="aggregate-prototype"><div class="attributes"></div><span class="builtin-type">class</span> WebSocketConnection {<div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.id.html"><div class="attributes">immutable </div><tt class="highlighted"><span class="hid">UUID</span></tt> <span class="name">id</span>;</a></div><div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.inputStream.html"><div class="attributes"></div><tt class="highlighted"><span class="hid">InputStream</span>!<span class="type">ubyte</span></tt> <span class="name">inputStream</span>;</a></div><div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.outputStream.html"><div class="attributes"></div><tt class="highlighted"><span class="hid">OutputStream</span>!<span class="type">ubyte</span></tt> <span class="name">outputStream</span>;</a></div><div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.this.html"><span class="lang-feature name">this</span>(WebSocketMessageHandler messageHandler, WebSocketRequestHandler requestHandler, InputStream!ubyte inputStream, OutputStream!ubyte outputStream);</a></div><div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.getMessageHandler.html"><tt class="highlighted"><span class="hid">WebSocketMessageHandler</span></tt> <span class="name">getMessageHandler</span>();</a></div><div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.getRequestHandler.html"><tt class="highlighted"><span class="hid">WebSocketRequestHandler</span></tt> <span class="name">getRequestHandler</span>();</a></div><div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.sendTextMessage.html"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">sendTextMessage</span>(string text);</a></div><div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.sendBinaryMessage.html"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">sendBinaryMessage</span>(ubyte[] bytes);</a></div><div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.sendCloseMessage.html"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">sendCloseMessage</span>(WebSocketCloseStatusCode status, string message);</a></div><div class="aggregate-member"><a href="handy_http_websockets.connection.WebSocketConnection.close.html"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">close</span>();</a></div>}</div></div><h2 id="constructors"><a class="header-anchor" href="#constructors">Constructors</a></h2><dl class="member-list constructors"><dt><a href="handy_http_websockets.connection.WebSocketConnection.this.html">this</a><div class="simplified-prototype" style="max-width: 162ch;"><span class="lang-feature name">this</span>(WebSocketMessageHandler messageHandler, WebSocketRequestHandler requestHandler, InputStream!ubyte inputStream, OutputStream!ubyte outputStream)</div></dt><dd><div><span class="undocumented-note">Undocumented in source.</span></div></dd></dl><h2 id="members"><a class="header-anchor" href="#members">Members</a></h2><h3 class="member-list-header hide-from-toc" id="function"><a class="header-anchor" href="#function">Functions</a></h3><dl class="member-list native"><dt><a href="handy_http_websockets.connection.WebSocketConnection.close.html">close</a><div class="simplified-prototype" style="max-width: 13ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">close</span>()</div></dt><dd><div><p>Closes this connection, if it's alive, sending a websocket close message.</p></div></dd><dt><a href="handy_http_websockets.connection.WebSocketConnection.getMessageHandler.html">getMessageHandler</a><div class="simplified-prototype" style="max-width: 47ch;"><tt class="highlighted"><span class="hid">WebSocketMessageHandler</span></tt> <span class="name">getMessageHandler</span>()</div></dt><dd><div><p>Gets the message handler that handles events for this connection.</p></div></dd><dt><a href="handy_http_websockets.connection.WebSocketConnection.getRequestHandler.html">getRequestHandler</a><div class="simplified-prototype" style="max-width: 47ch;"><tt class="highlighted"><span class="hid">WebSocketRequestHandler</span></tt> <span class="name">getRequestHandler</span>()</div></dt><dd><div><p>Gets the <tt class="inline-code">WebSocketRequestHandler</tt> that owns this connection. Use this
|
|
to interact with the set of connections managed by that handler.</p></div></dd><dt><a href="handy_http_websockets.connection.WebSocketConnection.sendBinaryMessage.html">sendBinaryMessage</a><div class="simplified-prototype" style="max-width: 40ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">sendBinaryMessage</span>(ubyte[] bytes)</div></dt><dd><div><p>Sends a binary message to the connected client.</p></div></dd><dt><a href="handy_http_websockets.connection.WebSocketConnection.sendCloseMessage.html">sendCloseMessage</a><div class="simplified-prototype" style="max-width: 77ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">sendCloseMessage</span>(WebSocketCloseStatusCode status, string message)</div></dt><dd><div><p>Sends a close message to the client, indicating that we'll be closing
|
|
the connection.</p></div></dd><dt><a href="handy_http_websockets.connection.WebSocketConnection.sendTextMessage.html">sendTextMessage</a><div class="simplified-prototype" style="max-width: 36ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">sendTextMessage</span>(string text)</div></dt><dd><div><p>Sends a text message to the connected client.</p></div></dd></dl><h3 class="member-list-header hide-from-toc" id="variable"><a class="header-anchor" href="#variable">Variables</a></h3><dl class="member-list native"><dt><a href="handy_http_websockets.connection.WebSocketConnection.id.html">id</a><div class="simplified-prototype" style="max-width: 8ch;"><tt class="highlighted"><span class="hid">UUID</span></tt> <span class="name">id</span>;</div></dt><dd><div><p>The internal id assigned to this connection.</p></div></dd><dt><a href="handy_http_websockets.connection.WebSocketConnection.inputStream.html">inputStream</a><div class="simplified-prototype" style="max-width: 33ch;"><tt class="highlighted"><span class="hid">InputStream</span>!<span class="type">ubyte</span></tt> <span class="name">inputStream</span>;</div></dt><dd><div><p>Stream for reading from the client.</p></div></dd><dt><a href="handy_http_websockets.connection.WebSocketConnection.outputStream.html">outputStream</a><div class="simplified-prototype" style="max-width: 35ch;"><tt class="highlighted"><span class="hid">OutputStream</span>!<span class="type">ubyte</span></tt> <span class="name">outputStream</span>;</div></dt><dd><div><p>Stream for writing to the client.</p></div></dd></dl><div></div></div>
|
|
<div id="page-nav"><a class="parent" href="handy_http_websockets.html">handy_http_websockets</a> <a class="parent" href="handy_http_websockets.connection.html">connection</a>
|
|
<span class="type-separator">classes</span><ul><li><a class="class current" href="handy_http_websockets.connection.WebSocketConnection.html">WebSocketConnection</a></li></ul></div>
|
|
</div>
|
|
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
|
|
</body>
|
|
</html> |