Skip to content

posix socket api to websocket does not work with any version of node's ws but works in chrome 92. #14750

@themighty1

Description

@themighty1

using latest emsdk

I compiled my project with ... -s WEBSOCKET_URL=ws://192.168.1.63:12345 -s WEBSOCKET_DEBUG=1 -s SOCKET_DEBUG=1 -o project.html

I launched a local ws server on port 12345 to see if any ws connection attempts are made.

I installed node's ws on client side. (I tried every version of ws with npm install ws@1 all the way to ws@7 to rule out that ws version is at fault)

node version is v16.5.0

when I launch the wasm client with
node project.js, I get on the node console

connect: ws://192.168.1.63:12345, binary
websocket adding peer: 192.168.1.63:12345

but nothing is logged on the ws server console.

When I load project.html in Chrome 92, I immediately see connection attempts on the server console.

I did read somewhere (can't find now where that node's ws version must be 2, so I tried all ws versions in the 2.0.0-2.3.1 range - to no avail)

I really hope I'm missing something simple here. I would appreciate any pointers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions