This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows for web servers to be "hijacked" and used as Web Socket servers (or other). You simply listen for requests as normal, but check if req.upgrade === true If so, this will be the last request of the connection. It's your job now to hijack req.connection and start reading from it. req.upgradeHead is a buffer containing the first part of the new protocol communication (in the case it arrived on the same packet). This needs tests and documentation. API subject to change.
- Loading branch information
Showing
2 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters