How to remove socket.io EIO and other parameters from urlHow does socket.io behave when client attempts to set up websocket with older protocol?Node.js Socket.io on Heroku throws H13Socket.io automatic timeout and transport errorIssue with socket.io and domain nameError during WebSocket handshake: Unexpected response code: 500Error during WebSocket handshake: Unexpected response code: 404 when trying to connect with JavaScriptSocket connection between JavaScript client and Android serverGoogle App Engine/Compute Engine with Socket.IOHow to get the responses from websocket server to client(socket.io) using nodejsHow to run socket.io on port 443 where apache is running?
Why command hierarchy, if the chain of command is standing next to each other?
Swap (and hibernation) on SSD in 2019?
Do I have to cite common CS algorithms?
What can Amex do if I cancel their card after using the sign up bonus miles?
What is the farthest a camera can see?
Would the USA be eligible to join the European Union?
Help, I cannot decide when to start the story
A trip to the library
How far did Gandalf and the Balrog drop from the bridge in Moria?
If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?
NRPE script for monitoring load average
Why is the second S silent in "Sens dessus dessous"?
What is the hottest thing in the universe?
Why aren't rockets built with truss structures inside their fuel & oxidizer tanks to increase structural strength?
How to remove ambiguity: "... lives in the city of H, the capital of the province of NS, WHERE the unemployment rate is ..."?
(A room / an office) where an artist works
Modeling the uncertainty of the input parameters
Will using a resistor in series with a LED to control its voltage increase the total energy expenditure?
What are those bumps on top of the Antonov-225?
How did Arecibo detect methane lakes on Titan, and image Saturn's rings?
A torrent of foreign terms
Dogfights in outer space
Why aren’t there water shutoff valves for each room?
Decipher case notes extract
How to remove socket.io EIO and other parameters from url
How does socket.io behave when client attempts to set up websocket with older protocol?Node.js Socket.io on Heroku throws H13Socket.io automatic timeout and transport errorIssue with socket.io and domain nameError during WebSocket handshake: Unexpected response code: 500Error during WebSocket handshake: Unexpected response code: 404 when trying to connect with JavaScriptSocket connection between JavaScript client and Android serverGoogle App Engine/Compute Engine with Socket.IOHow to get the responses from websocket server to client(socket.io) using nodejsHow to run socket.io on port 443 where apache is running?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
When I configure socket-io with the following options:
url: 'ws://localhost:8888', options: path: '/chatws', transports: ['websocket'], reconnectionAttempts: '3'
I get the following error
WebSocket connection to 'ws://localhost:8888/chatws/?EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 501
If I use other frameworks that do not add any parameters then it works.
How does one remove the EIO and all query parameters from the URL?
socket.io
add a comment |
When I configure socket-io with the following options:
url: 'ws://localhost:8888', options: path: '/chatws', transports: ['websocket'], reconnectionAttempts: '3'
I get the following error
WebSocket connection to 'ws://localhost:8888/chatws/?EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 501
If I use other frameworks that do not add any parameters then it works.
How does one remove the EIO and all query parameters from the URL?
socket.io
add a comment |
When I configure socket-io with the following options:
url: 'ws://localhost:8888', options: path: '/chatws', transports: ['websocket'], reconnectionAttempts: '3'
I get the following error
WebSocket connection to 'ws://localhost:8888/chatws/?EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 501
If I use other frameworks that do not add any parameters then it works.
How does one remove the EIO and all query parameters from the URL?
socket.io
When I configure socket-io with the following options:
url: 'ws://localhost:8888', options: path: '/chatws', transports: ['websocket'], reconnectionAttempts: '3'
I get the following error
WebSocket connection to 'ws://localhost:8888/chatws/?EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 501
If I use other frameworks that do not add any parameters then it works.
How does one remove the EIO and all query parameters from the URL?
socket.io
socket.io
asked Mar 27 at 10:34
KwadwoKwadwo
112 bronze badges
112 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
That's not the case.
While you are implementing only websocket based transportation, you need to configure that in both sides. As by default, socket.io try to establish the connection using long polling.
Server-side implementation:
const express = require('express')()
const server = require('http').createServer(express)
const io = require('socket.io')(server,transports:['websocket'])
Client Side Implenation :
import io from 'socket.io-client'
const socket = io('http://localhost:8080',transports: ['websocket'])
This worked for me!
This does not answer the question - How does one remove the EIO and all query parameters from the URL?
– Kwadwo
May 13 at 2:42
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375101%2fhow-to-remove-socket-io-eio-and-other-parameters-from-url%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
That's not the case.
While you are implementing only websocket based transportation, you need to configure that in both sides. As by default, socket.io try to establish the connection using long polling.
Server-side implementation:
const express = require('express')()
const server = require('http').createServer(express)
const io = require('socket.io')(server,transports:['websocket'])
Client Side Implenation :
import io from 'socket.io-client'
const socket = io('http://localhost:8080',transports: ['websocket'])
This worked for me!
This does not answer the question - How does one remove the EIO and all query parameters from the URL?
– Kwadwo
May 13 at 2:42
add a comment |
That's not the case.
While you are implementing only websocket based transportation, you need to configure that in both sides. As by default, socket.io try to establish the connection using long polling.
Server-side implementation:
const express = require('express')()
const server = require('http').createServer(express)
const io = require('socket.io')(server,transports:['websocket'])
Client Side Implenation :
import io from 'socket.io-client'
const socket = io('http://localhost:8080',transports: ['websocket'])
This worked for me!
This does not answer the question - How does one remove the EIO and all query parameters from the URL?
– Kwadwo
May 13 at 2:42
add a comment |
That's not the case.
While you are implementing only websocket based transportation, you need to configure that in both sides. As by default, socket.io try to establish the connection using long polling.
Server-side implementation:
const express = require('express')()
const server = require('http').createServer(express)
const io = require('socket.io')(server,transports:['websocket'])
Client Side Implenation :
import io from 'socket.io-client'
const socket = io('http://localhost:8080',transports: ['websocket'])
This worked for me!
That's not the case.
While you are implementing only websocket based transportation, you need to configure that in both sides. As by default, socket.io try to establish the connection using long polling.
Server-side implementation:
const express = require('express')()
const server = require('http').createServer(express)
const io = require('socket.io')(server,transports:['websocket'])
Client Side Implenation :
import io from 'socket.io-client'
const socket = io('http://localhost:8080',transports: ['websocket'])
This worked for me!
answered May 11 at 18:52
SouravSourav
12 bronze badges
12 bronze badges
This does not answer the question - How does one remove the EIO and all query parameters from the URL?
– Kwadwo
May 13 at 2:42
add a comment |
This does not answer the question - How does one remove the EIO and all query parameters from the URL?
– Kwadwo
May 13 at 2:42
This does not answer the question - How does one remove the EIO and all query parameters from the URL?
– Kwadwo
May 13 at 2:42
This does not answer the question - How does one remove the EIO and all query parameters from the URL?
– Kwadwo
May 13 at 2:42
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375101%2fhow-to-remove-socket-io-eio-and-other-parameters-from-url%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown