/usr/share/doc/racket/net/websocket.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>4 WebSocket</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Net:<span class="mywbr"> </span> Networking Libraries</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="http-client.html" class="tocviewlink" data-pltdoc="x">HTTP Client</a></td></tr><tr><td align="right">2 </td><td><a href="url.html" class="tocviewlink" data-pltdoc="x">URLs and HTTP</a></td></tr><tr><td align="right">3 </td><td><a href="uri-codec.html" class="tocviewlink" data-pltdoc="x">URI Codec:<span class="mywbr"> </span> Encoding and Decoding URIs</a></td></tr><tr><td align="right">4 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Web<span class="mywbr"> </span>Socket</a></td></tr><tr><td align="right">5 </td><td><a href="ftp.html" class="tocviewlink" data-pltdoc="x">FTP:<span class="mywbr"> </span> Client</a></td></tr><tr><td align="right">6 </td><td><a href="sendurl.html" class="tocviewlink" data-pltdoc="x">Send URL:<span class="mywbr"> </span> Opening a Web Browser</a></td></tr><tr><td align="right">7 </td><td><a href="smtp.html" class="tocviewlink" data-pltdoc="x">SMTP:<span class="mywbr"> </span> Sending E-<wbr></wbr>Mail</a></td></tr><tr><td align="right">8 </td><td><a href="sendmail.html" class="tocviewlink" data-pltdoc="x"><span class="stt">sendmail</span>:<span class="mywbr"> </span> Sending E-<wbr></wbr>Mail</a></td></tr><tr><td align="right">9 </td><td><a href="head.html" class="tocviewlink" data-pltdoc="x">Headers:<span class="mywbr"> </span> Parsing and Constructing</a></td></tr><tr><td align="right">10 </td><td><a href="imap.html" class="tocviewlink" data-pltdoc="x">IMAP:<span class="mywbr"> </span> Reading Mail</a></td></tr><tr><td align="right">11 </td><td><a href="pop3.html" class="tocviewlink" data-pltdoc="x">POP3:<span class="mywbr"> </span> Reading Mail</a></td></tr><tr><td align="right">12 </td><td><a href="mime.html" class="tocviewlink" data-pltdoc="x">MIME:<span class="mywbr"> </span> Decoding Internet Data</a></td></tr><tr><td align="right">13 </td><td><a href="base64.html" class="tocviewlink" data-pltdoc="x">Base 64:<span class="mywbr"> </span> Encoding and Decoding</a></td></tr><tr><td align="right">14 </td><td><a href="qp.html" class="tocviewlink" data-pltdoc="x">Quoted-<wbr></wbr>Printable:<span class="mywbr"> </span> Encoding and Decoding</a></td></tr><tr><td align="right">15 </td><td><a href="dns.html" class="tocviewlink" data-pltdoc="x">DNS:<span class="mywbr"> </span> Domain Name Service Queries</a></td></tr><tr><td align="right">16 </td><td><a href="nntp.html" class="tocviewlink" data-pltdoc="x">NNTP:<span class="mywbr"> </span> Newsgroup Protocol</a></td></tr><tr><td align="right">17 </td><td><a href="tcp.html" class="tocviewlink" data-pltdoc="x">TCP:<span class="mywbr"> </span> Unit and Signature</a></td></tr><tr><td align="right">18 </td><td><a href="tcp-redirect.html" class="tocviewlink" data-pltdoc="x">TCP Redirect:<span class="mywbr"> </span> <span class="RktSym"><span class="RktStxLink">tcp^</span></span> via Channels</a></td></tr><tr><td align="right">19 </td><td><a href="ssl-tcp-unit.html" class="tocviewlink" data-pltdoc="x">SSL Unit:<span class="mywbr"> </span> <span class="RktSym"><span class="RktStxLink">tcp^</span></span> via SSL</a></td></tr><tr><td align="right">20 </td><td><a href="cgi.html" class="tocviewlink" data-pltdoc="x">CGI Scripts</a></td></tr><tr><td align="right">21 </td><td><a href="cookie.html" class="tocviewlink" data-pltdoc="x">Cookie:<span class="mywbr"> </span> HTTP Client Storage</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>4 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Web<span class="mywbr"> </span>Socket</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1 </td><td><a href="#%28part._.Client_.A.P.I%29" class="tocviewlink" data-pltdoc="x">Client API</a></td></tr><tr><td align="right">4.2 </td><td><a href="#%28part._.Server_.A.P.I%29" class="tocviewlink" data-pltdoc="x">Server API</a></td></tr><tr><td align="right">4.3 </td><td><a href="#%28part._.Connections%29" class="tocviewlink" data-pltdoc="x">Connections</a></td></tr><tr><td align="right">4.4 </td><td><a href="#%28part._.Example%29" class="tocviewlink" data-pltdoc="x">Example</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">4.1<tt> </tt></span><a href="#%28part._.Client_.A.P.I%29" class="tocsubseclink" data-pltdoc="x">Client API</a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fclient..rkt%29._ws-url~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>url?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fclient..rkt%29._wss-url~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">wss-<wbr></wbr>url?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fclient..rkt%29._ws-connect%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>connect</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.2<tt> </tt></span><a href="#%28part._.Server_.A.P.I%29" class="tocsubseclink" data-pltdoc="x">Server API</a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fserver..rkt%29._ws-serve%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>serve</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.3<tt> </tt></span><a href="#%28part._.Connections%29" class="tocsubseclink" data-pltdoc="x">Connections</a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._framing-mode%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">framing-<wbr></wbr>mode</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>conn?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._open-ws-conn~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">open-<wbr></wbr>ws-<wbr></wbr>conn?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn-line%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>conn-<wbr></wbr>line</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn-closed~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>conn-<wbr></wbr>closed?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn-headers%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>conn-<wbr></wbr>headers</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-send%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>send!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-recv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>recv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-close%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ws-<wbr></wbr>close!</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.4<tt> </tt></span><a href="#%28part._.Example%29" class="tocsubseclink" data-pltdoc="x">Example</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="uri-codec.html" title="backward to "3 URI Codec: Encoding and Decoding URIs"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Net: Networking Libraries"" data-pltdoc="x">up</a> <a href="ftp.html" title="forward to "5 FTP: Client"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""websocket"">4<tt> </tt><a name="(part._websocket)"></a><a name="(mod-path._net/websocket)"></a>WebSocket</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/websocket</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">web-server-lib</span></span></td></tr></table></p><p>The <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/websocket</span></a> library provides
utilities to run and communicate with WebSocket servers,
as specified in <a href="http://www.whatwg.org/specs/web-socket-protocol/">the WebSocket protocol</a> IETF draft
as of August 16th, 2010.</p><p>This module provides the exports from <a href="#%28mod-path._net%2Fwebsocket%2Fclient%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/websocket/client</span></a> and <a href="#%28mod-path._net%2Fwebsocket%2Fserver%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/websocket/server</span></a>.</p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""Client_API"">4.1<tt> </tt><a name="(part._.Client_.A.P.I)"></a><a name="(mod-path._net/websocket/client)"></a>Client API</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._net%2Fwebsocket%2Fclient%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/websocket/client</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">web-server-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/client..rkt)._ws-url~3f))"></a><span title="Provided from: net/websocket/client | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fclient..rkt%29._ws-url~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-url?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns true if <span class="RktVar">x</span> is a <span class="RktSym"><a href="url.html#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span> and has a <span class="RktSym"><a href="url.html#%28def._%28%28lib._net%2Furl-structs..rkt%29._url-scheme%29%29" class="RktValLink" data-pltdoc="x">url-scheme</a></span> equal to <span class="RktInBG"><span class="hspace"></span><span class="RktIn">ws</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">wss</span><span class="hspace"></span></span>. </div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/client..rkt)._wss-url~3f))"></a><span title="Provided from: net/websocket/client | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fclient..rkt%29._wss-url~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">wss-url?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns true if <span class="RktVar">x</span> is a <span class="RktSym"><a href="url.html#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span> and has a <span class="RktSym"><a href="url.html#%28def._%28%28lib._net%2Furl-structs..rkt%29._url-scheme%29%29" class="RktValLink" data-pltdoc="x">url-scheme</a></span> equal to <span class="RktInBG"><span class="hspace"></span><span class="RktIn">wss</span><span class="hspace"></span></span>. </div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/client..rkt)._ws-connect))"></a><span title="Provided from: net/websocket/client | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fclient..rkt%29._ws-connect%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-connect</a></span></span><span class="hspace"> </span><span class="RktVar">u</span><span class="hspace"> </span>[<span class="RktPn">#:headers</span><span class="hspace"> </span><span class="RktVar">headers</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._open-ws-conn~3f%29%29" class="RktValLink" data-pltdoc="x">open-ws-conn?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">u</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fclient..rkt%29._ws-url~3f%29%29" class="RktValLink" data-pltdoc="x">ws-url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">headers</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=web-server&rel=http.html%23%2528def._%2528%2528lib._web-server%252Fhttp%252Frequest-structs..rkt%2529._header%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">header?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Flist..rkt%2529._empty%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">empty</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Connects to the WebSocket server specified by <span class="RktVar">u</span>, providing <span class="RktVar">headers</span> as additional headers.
Returns the connection handle.</div></p><p>This module also provides the exports from <a href="#%28mod-path._net%2Fwebsocket%2Fconn%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/websocket/conn</span></a>.</p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""Server_API"">4.2<tt> </tt><a name="(part._.Server_.A.P.I)"></a><a name="(mod-path._net/websocket/server)"></a>Server API</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._net%2Fwebsocket%2Fserver%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/websocket/server</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">web-server-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._net/websocket/server..rkt)._ws-serve))"></a><span title="Provided from: net/websocket/server | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fserver..rkt%29._ws-serve%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-serve</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">conn-handle</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:conn-headers</span><span class="hspace"> </span><span class="RktVar">conn-headers</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:tcp@</span><span class="hspace"> </span><span class="RktVar">tcp@</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:port</span><span class="hspace"> </span><span class="RktVar">port</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:listen-ip</span><span class="hspace"> </span><span class="RktVar">listen-ip</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:max-waiting</span><span class="hspace"> </span><span class="RktVar">max-waiting</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:timeout</span><span class="hspace"> </span><span class="RktVar">timeout</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:confirmation-channel</span><span class="hspace"> </span><span class="RktVar">confirm-ch</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void</a></span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">conn-handle</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._open-ws-conn~3f%29%29" class="RktValLink" data-pltdoc="x">open-ws-conn?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void</a></span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">conn-headers</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=web-server&rel=http.html%23%2528def._%2528%2528lib._web-server%252Fhttp%252Frequest-structs..rkt%2529._header%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">header?</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=values.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._values%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">values</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=web-server&rel=http.html%23%2528def._%2528%2528lib._web-server%252Fhttp%252Frequest-structs..rkt%2529._header%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">header?</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td>=</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">hs</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=values.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._values%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">values</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Flist..rkt%2529._empty%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">empty</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">tcp@</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">unit/c</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">import</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">export</span><span class="hspace"> </span><span class="RktSym">tcp^</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._net%2Ftcp-unit..rkt%29._tcp~40%29%29" class="RktValLink" data-pltdoc="x">raw:tcp@</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">port</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=unstable&rel=contract.html%23%2528def._%2528%2528lib._unstable%252Fcontract..rkt%2529._tcp-listen-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">tcp-listen-port?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">80</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">listen-ip</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">max-waiting</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">4</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">timeout</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="hspace"> </span><span class="RktVal">60</span><span class="hspace"> </span><span class="RktVal">60</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">confirm-ch</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=async-channel.html%23%2528def._%2528%2528lib._racket%252Fasync-channel..rkt%2529._async-channel%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">async-channel?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Starts a WebSocket server where each new connection uses <span class="RktVar">conn-headers</span> to compute
what headers the client receives based on the client’s request line and headers. <span class="RktVar">conn-headers</span>
also returns a piece of state that will be passed to <span class="RktVar">conn-handle</span> as its second argument.
After the connection handshake is finished, <span class="RktVar">conn-handle</span> receives the connection and is in
sole control until the WebSocket connection completes.</div></p><p>All other arguments are used as in a <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=web-server-internal&rel=dispatch-server-unit.html&version=6.1" class="Sq" data-pltdoc="x">Dispatching Server</a>. Similarly, the return result is a function that shuts down the server, just like a dispatch server.</p><p>The <span class="RktPn">#:tcp@</span> keyword is provided for building an SSL server.</p><p>This module also provides the exports from <a href="#%28mod-path._net%2Fwebsocket%2Fconn%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/websocket/conn</span></a>.</p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""Connections"">4.3<tt> </tt><a name="(part._.Connections)"></a><a name="(mod-path._net/websocket/conn)"></a>Connections</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._net%2Fwebsocket%2Fconn%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/websocket/conn</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">web-server-lib</span></span></td></tr></table></p><p>WebSocket connection are synchronizable events.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/conn..rkt)._framing-mode))"></a><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._framing-mode%29%29" class="RktValDef RktValLink" data-pltdoc="x">framing-mode</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._symbols%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbols</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">old</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">new</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._framing-mode%29%29" class="RktValDef RktValLink" data-pltdoc="x">framing-mode</a></span></span><span class="hspace"> </span><span class="RktVar">mode</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">mode</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._symbols%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbols</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">old</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">new</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"> Controls whether framing is as before August 16th, 2010 or after. (Most Web browsers currently support only <span class="RktVal">'</span><span class="RktVal">old</span> and they are incompatible, so you must choose the correct one.) Defaults to <span class="RktVal">'</span><span class="RktVal">old</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/conn..rkt)._ws-conn~3f))"></a><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-conn?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns true if <span class="RktVar">x</span> is a WebSocket connection. </div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/conn..rkt)._open-ws-conn~3f))"></a><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._open-ws-conn~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">open-ws-conn?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns true if <span class="RktVar">x</span> is an open WebSocket connection. </div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/conn..rkt)._ws-conn-line))"></a><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn-line%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-conn-line</a></span></span><span class="hspace"> </span><span class="RktVar">ws</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ws</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn~3f%29%29" class="RktValLink" data-pltdoc="x">ws-conn?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns the request/response line of the WebSocket connection.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/conn..rkt)._ws-conn-closed~3f))"></a><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn-closed~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-conn-closed?</a></span></span><span class="hspace"> </span><span class="RktVar">ws</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ws</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn~3f%29%29" class="RktValLink" data-pltdoc="x">ws-conn?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns true if the WebSocket connection has been closed.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/conn..rkt)._ws-conn-headers))"></a><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn-headers%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-conn-headers</a></span></span><span class="hspace"> </span><span class="RktVar">ws</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=web-server&rel=http.html%23%2528def._%2528%2528lib._web-server%252Fhttp%252Frequest-structs..rkt%2529._header%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">header?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ws</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-conn~3f%29%29" class="RktValLink" data-pltdoc="x">ws-conn?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns the headers of the WebSocket connection. </div></p><p>WebSocket connection support only blocking calls:</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/conn..rkt)._ws-send!))"></a><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-send%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-send!</a></span></span><span class="hspace"> </span><span class="RktVar">ws</span><span class="hspace"> </span><span class="RktVar">s</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ws</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._open-ws-conn~3f%29%29" class="RktValLink" data-pltdoc="x">open-ws-conn?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">s</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Sends <span class="RktVar">s</span> over <span class="RktVar">ws</span>.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/conn..rkt)._ws-recv))"></a><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-recv%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-recv</a></span></span><span class="hspace"> </span><span class="RktVar">ws</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eof-object%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">eof-object?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ws</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._open-ws-conn~3f%29%29" class="RktValLink" data-pltdoc="x">open-ws-conn?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Receives a string from <span class="RktVar">ws</span>. Returns <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">eof</a></span> if the other end closes the connection. </div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/websocket/conn..rkt)._ws-close!))"></a><span title="Provided from: net/websocket/conn | Package: web-server-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-close%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ws-close!</a></span></span><span class="hspace"> </span><span class="RktVar">ws</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ws</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._open-ws-conn~3f%29%29" class="RktValLink" data-pltdoc="x">open-ws-conn?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Closes <span class="RktVar">ws</span>. </div></p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""Example"">4.4<tt> </tt><a name="(part._.Example)"></a>Example</h4><p>This is a WebSocket echo server compatible with the browser origin security model:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fserver..rkt%29._ws-serve%29%29" class="RktValLink" data-pltdoc="x">ws-serve</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:port</span><span class="hspace"> </span><span class="RktVal">8080</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">wsc</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktSym">loop</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-recv%29%29" class="RktValLink" data-pltdoc="x">ws-recv</a></span><span class="hspace"> </span><span class="RktSym">wsc</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._printf%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">printf</a></span><span class="hspace"> </span><span class="RktVal">"~a\n"</span><span class="hspace"> </span><span class="RktSym">m</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=when_unless.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._unless%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">unless</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eof-object%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">eof-object?</a></span><span class="hspace"> </span><span class="RktSym">m</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fwebsocket%2Fconn..rkt%29._ws-send%21%29%29" class="RktValLink" data-pltdoc="x">ws-send!</a></span><span class="hspace"> </span><span class="RktSym">wsc</span><span class="hspace"> </span><span class="RktSym">m</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">loop</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:conn-headers</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktSym">hs</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">origin</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=web-server&rel=http.html%23%2528def._%2528%2528lib._web-server%252Fhttp%252Frequest-structs..rkt%2529._header-value%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">header-value</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=web-server&rel=http.html%23%2528def._%2528%2528lib._web-server%252Fhttp%252Frequest-structs..rkt%2529._headers-assq%252A%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">headers-assq*</a></span><span class="hspace"> </span><span class="RktVal">#"Origin"</span><span class="hspace"> </span><span class="RktSym">hs</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=values.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._values%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">values</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=web-server&rel=http.html%23%2528def._%2528%2528lib._web-server%252Fhttp%252Frequest-structs..rkt%2529._make-header%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">make-header</a></span><span class="hspace"> </span><span class="RktVal">#"Sec-WebSocket-Origin"</span><span class="hspace"> </span><span class="RktSym">origin</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=web-server&rel=http.html%23%2528def._%2528%2528lib._web-server%252Fhttp%252Frequest-structs..rkt%2529._make-header%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">make-header</a></span><span class="hspace"> </span><span class="RktVal">#"Sec-WebSocket-Location"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">#"ws://localhost:8080/"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="uri-codec.html" title="backward to "3 URI Codec: Encoding and Decoding URIs"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Net: Networking Libraries"" data-pltdoc="x">up</a> <a href="ftp.html" title="forward to "5 FTP: Client"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|