Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么 Heroku 服务器上没有调用“升级”事件?
var server = new http.Server(); server.on('upgrade', function(req, socket, upgradeHead) { // ... });
相反,正在调用“请求”事件。
我在本地机器上运行相同的脚本,并且通过 websocket 请求调用升级事件。
是禁止的吗?
谢谢。
Heroku 尚不支持 WebSocket。请参阅:在 Heroku 上将 Socket.IO 与 Node.js 结合使用。