How to connect the websocket mechanism and how to check that it is enabled from the outside? #12786
-
Hi. When starting a lotus node, how do I enable the websocket mechanism? What is the default address for websocket? Do I understand these addresses correctly? http url works well and connects. But websocket does not work.
are there any other flags that need to be changed |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Websockets is enabled on the same port and URL as the HTTP endpoint - websockets is just an "upgrade" for an HTTP connection so the same port serves that purpose. If You can use a library like
|
Beta Was this translation helpful? Give feedback.
Websockets is enabled on the same port and URL as the HTTP endpoint - websockets is just an "upgrade" for an HTTP connection so the same port serves that purpose. If
http://x.x.x.x:1234/rpc/v1
works, thenws://x.x.x.x:1234/rpc/v1
will work, unless you have something odd going on with your network or websockets library.You can use a library like
wscat
to debug if you want, e.g.: