Closed jazzyjeff5 closed 4 years ago
Woah, that seems to be not documented at all! Thanks for the issue.
socket.io is implemented as a plugin, which means that you might think this would work:
// Ideal, but does not work now
const options = {
socket: { ... }
};
server(options, middleware);
Unfortunately options are not passed to the socket.io constructor currently:
// plugins/socket/index.js
ctx.io = socketIO(ctx.server); // No options
Let me try to fix this
It should be fixed now if you upgrade to the latest server
🎉
Could you please try it and let me know? See the example for some reference.
Works, thank you very much :D
So happy to hear 🎉
Please let me know if you find any other issue. I'll leave this open until I can document the option later
Added some basic docs to the website:
Please feel free to improve them! Documentation for this is here:
What value did you end up using for maxHttpBufferSize
? That sounds like a good example for the docs.
Sorry if this is explained in the documentation, I couldn't find it. ServerJS uses socket.io to handle websockets, right?
I need to configure maxHttpBufferSize to limit huge messages from being sent to my server, see:
https://socket.io/docs/server-api/
How do I set this parameter through ServerJS? Thanks!