* Binds socket.io to an engine.io instance. * * @param engine engine.io (or compatible) server * @return self
(engine: any)
| 723 | * @return self |
| 724 | */ |
| 725 | public bind(engine: any): this { |
| 726 | class="cm">// TODO apply strict types to the engine: class="st">"connection" event, `close()` and a method to serve static content |
| 727 | class="cm">// this would allow to provide any custom engine, like one based on Deno or Bun built-in HTTP server |
| 728 | this.engine = engine; |
| 729 | this.engine.on(class="st">"connection", this.onconnection.bind(this)); |
| 730 | return this; |
| 731 | } |
| 732 | |
| 733 | /** |
| 734 | * Called with each incoming transport connection. |
no test coverage detected