.html">HttpRequest</a> to a <a href="dart-io/WebSocket-class.html">WebSocket</a> connection. If the
request is not a valid WebSocket upgrade request an HTTP response
with status code 500 will be returned. Otherwise the returned
future will complete with the <a href="dart-io/WebSocket-class.html">WebSocket</a> when the upgrade process
is complete.</p>
<p>If <code>protocolSelector</code> is provided, <code>protocolSelector</code> will be called to
select what protocol to use, if any were provided by the clien