-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will there be a update for the new uWebSockets? #3601
Comments
uws is dead, you can use alternative https://www.npmjs.com/package/eiows |
I'm not sure uWebSockets uses UDP under the hood. More info here: https://gafferongames.com/post/why_cant_i_send_udp_packets_from_a_browser/ The uWebSockets.js package does not implement the API of ws, so it can't be used as is. A wrapper could be added though. As noted by @dkMorlok, a fork of the original // $ npm install eiows
const io = require('socket.io')(3000, {
wsEngine: 'eiows'
}); Source here: https://github.com/mmdevries/eiows |
Usage: ```js const { App } = require("uWebSockets.js"); const { Server } = require("socket.io"); const app = new App(); const server = new Server(); server.attachApp(app); app.listen(3000); ``` The Adapter prototype is updated so we can benefit from the publish functionality of uWebSockets.js, so this will apply to all adapters extending the default adapter. Reference: https://github.com/uNetworking/uWebSockets.js Related: - #3601 - socketio/engine.io#578
Usage: ```js const { App } = require("uWebSockets.js"); const { Server } = require("socket.io"); const app = new App(); const server = new Server(); server.attachApp(app); app.listen(3000); ``` The Adapter prototype is updated so we can benefit from the publish functionality of uWebSockets.js, so this will apply to all adapters extending the default adapter. Reference: https://github.com/uNetworking/uWebSockets.js Related: - socketio#3601 - socketio/engine.io#578
You want to:
Current behavior
What is actually happening?
When I tried to use the original uws package, I got a compilation error. When I used the new uWebSockets, some of the methods were missing.
Expected behavior
What is expected?
Setup
Other information (e.g. stack traces, related issues, suggestions on how to fix)
I'm not using socket.io for a web app, I'm creating a game in ue4 with the ue4-client.
I was just thinking if you guys could implement it somehow? So that it works with the new uWebSockets? I found that the UDP protocol which uWebSockets uses is much better for games than TCP, so that'd be great.
Thanks for your time
The text was updated successfully, but these errors were encountered: