Difference between revisions of "Socket.io-client"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
<code>[[npm install socket.io-client]]</code> | <code>[[npm install socket.io-client]]</code> | ||
− | |||
As explained in the "What Socket.IO is not" section, the Socket.IO client is not a WebSocket implementation and thus will not be able to establish a connection with a WebSocket server, even with transports: ["[[websocket]]"] | As explained in the "What Socket.IO is not" section, the Socket.IO client is not a WebSocket implementation and thus will not be able to establish a connection with a WebSocket server, even with transports: ["[[websocket]]"] | ||
− | |||
<code>engine.io-client:socket creating transport "polling" +0ms</code> | <code>engine.io-client:socket creating transport "polling" +0ms</code> | ||
<code>socket.io-parser decoded 4{"message":"[[No auth token]]"} as {"type":4,"nsp":"/","data":{"message":"[[No auth token]]"}} +732ms</code> | <code>socket.io-parser decoded 4{"message":"[[No auth token]]"} as {"type":4,"nsp":"/","data":{"message":"[[No auth token]]"}} +732ms</code> | ||
+ | |||
+ | [[No auth token]] | ||
+ | [[Signature verification failed]] | ||
+ | |||
+ | |||
+ | client.on("connect_error", (err) => { | ||
+ | console.log(`connect_error due to ${err.message}`); | ||
+ | }); | ||
== Related == | == Related == | ||
* <code>[[wscat]]</code> | * <code>[[wscat]]</code> | ||
+ | * <code>[[DEBUG=* node your_app.js]]</code> | ||
== See also == | == See also == |
Latest revision as of 16:28, 14 March 2023
As explained in the "What Socket.IO is not" section, the Socket.IO client is not a WebSocket implementation and thus will not be able to establish a connection with a WebSocket server, even with transports: ["websocket"]
engine.io-client:socket creating transport "polling" +0ms
socket.io-parser decoded 4{"message":"No auth token"} as {"type":4,"nsp":"/","data":{"message":"No auth token"}} +732ms
No auth token Signature verification failed
client.on("connect_error", (err) => { console.log(`connect_error due to ${err.message}`); });
Related[edit]
See also[edit]
Advertising: