You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a note in the changelog about this. Seems like the information there is wrong, because it says installHandlers was renamed to attach.
Maybe that was the plan at some point, but installHandlers is still present in the package. So I think the answer is to use installHandlers instead of attach, or pull the code from github for the latest version.
@insanity54 hi it is indeed like you said. Thanks!
May I ask another question ? If it is not appropriate to ask here please let me know. I try sockjs because I want to see if there is any scenario where sockjs is better than socket.io, which I already use. And as you can image my first try didn't give me great impression.
So from your experience if there is any scenario/use case where sockjs is better than socket.io ?
I did google that but I can't find any result too.
Activity
insanity54 commentedon Dec 27, 2022
I'm also seeing this issue.
That's true in the source, but it's not the case in the npm package. Here's the Server class in my
node_modules/sockjs/lib/sockjs.js(0.3.24)There's a note in the changelog about this. Seems like the information there is wrong, because it says installHandlers was renamed to attach.
Maybe that was the plan at some point, but installHandlers is still present in the package. So I think the answer is to use installHandlers instead of attach, or pull the code from github for the latest version.
EDIT-- I see that the main branch contains pre-release code. The latest stable branch is https://github.com/sockjs/sockjs-node/tree/v0.3.19 which has examples refeerencing .installHandlers()
qiulang commentedon Dec 28, 2022
@insanity54 hi it is indeed like you said. Thanks!
May I ask another question ? If it is not appropriate to ask here please let me know. I try sockjs because I want to see if there is any scenario where sockjs is better than socket.io, which I already use. And as you can image my first try didn't give me great impression.
So from your experience if there is any scenario/use case where sockjs is better than socket.io ?
I did google that but I can't find any result too.