# GrapeCity.Documents.Html.WebSocketFactory

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Html_WebSocketFactory" data-uid="GrapeCity.Documents.Html.WebSocketFactory" class="text-break">WebSocketFactory Delegate
</h1>
  <div class="markdown level0 summary"><p>Delegate for creation of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.net.websockets.websocket">WebSocket</a> instances.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Html.html">GrapeCity.Documents.Html</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Html.dll</h6>
  <h5 id="GrapeCity_Documents_Html_WebSocketFactory_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public delegate Task&lt;WebSocket&gt; WebSocketFactory(Uri url)</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Delegate Function WebSocketFactory(url As Uri) As Task(Of WebSocket)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">Uri</span></td>
        <td><span class="parametername">url</span></td>
        <td><p>A browser WebSocket endpoint to connect to.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.net.websockets.websocket">WebSocket</a>&gt;</td>
        <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task&lt;TResult&gt;</a> instance for the asynchronous socket create and connect operation.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
