The goal is to connect to a socket.io server which uses version 3 of Engine.IO transport protocol EIO=3... This kind of 2 questions in one due to uncertainty... The first is can socket.io client version 3.0 make use of EIO=3 instead of using EIO=4 which is it's basic setting and the second question is how can I handle all the events that get sent by the server without stating the particular event(the reason for this is because I might not know the name of the event or be expecting it at all).. thanks
Is there a way of making socket.io client version 3.0 make use of EIO=3 in javascript
812 Views Asked by Exboy At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in SOCKET.IO
- How to Socket.IO Multithreading on a Raspberry Pi?
- Error while uploading the socket io chat app
- Socket.io nodejs server .NET connection
- Getting an error in Socket.io wordle project
- User is connecting to socket.io server twice
- Using Bun+Elysia+socket.io together
- Socket.io event doesn't emitting from client itself client
- Socket.io not emitting event to node server on react native
- My socket.io web socket application is not sending data to some users
- Web RTC simple peer connection with socket.io could not be established
- socket io working fine on local environment but causes problem when run using deployed site
- rasa not responding when setting the value of session_persistence: true using socket
- open-telemetry observable gauge in js - how to access field used in observable gauge inside socket.io method
- Socket io not working during deployment on vercel
- Socket.io Deployment
Related Questions in ENGINE.IO
- Is it appropriate to respond to an EngineIO ping before completing the handshake?
- Socket.io Task threw exception IllegalArgumentException
- Gatsby Wordpress Starter Themes - New project fails on NPM install
- socket.io 404 error: socket.io/?transport=polling&t=OUFK089
- Socket.io Engine.io problems "?EIO=4&transport=polling&t=OUAHy-a 404"
- Is there a way of making socket.io client version 3.0 make use of EIO=3 in javascript
- Connecting from socket.io-client via squid gives 502 bad gateway
- rust_socketio example implementation panicked at EngineIO Error
- Socket IO allows CORS request from curl, but not from client application
- React Native socket.io websocket can't connect if connection drops once
- socket.io: Share socket.id with other users
- Shared users using Socket.io with http polling
- engine.io [RangeError: Maximum call stack size exceeded]
- WebSocket is closed before the connection is established - Socket.io usage error on production
- Should I re-authenticate once Socket.io upgrades to WebSockets?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
In socket.io,
engine.iois the underlying protocol module for socket.io and theEIOparameter in the URL literally is an abbreviation for "engine.io".A version 3 engine.io client only talks to a version 3 engine.io server and it is the EIO=3 or EIO=4 that communicates the engine.io version. So, I don't think a version 3.0 client can talk to a version 4.0 server. That's just how they do it. So, if you have a 4.0 server, you need a 4.0 client.
It is probably possible for your server to run both a 3.0 and a 4.0 server and somehow direct the incoming client request to the right server with some sort of middleware that detects the
EIO=xvalue. I've not tried it myself or seen it done, but it should be feasible with the right code.As for listening for all events without naming them, there's a socket.io FAQ here that says that socket.io does not have that feature built in, but there is a third party plug-in (using middleware) that makes it possible.
FYI, this article discusses the breaking changes made in v4 of engine.io.
And, here's some prior discussion on how to run multiple versions of socket.io on the server.
Because the engine.io major version did not change going from socket.io 3.x to 4.x, a 4.x server can accept connections from either a 3.x or 4.x socket.io client and with a compatibility option a 4.x server will even accept connections from a v2 socket.io client. See https://socket.io/blog/socket-io-4-release/ for details.