mirror of https://github.com/lukechilds/node.git
Browse Source
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.v0.7.4-release
Ryan Dahl
15 years ago
2 changed files with 38 additions and 8 deletions
Loading…
Reference in new issue