robtaussig / react-use-websocket

React Hook for WebSocket communication
MIT License
1.62k stars 135 forks source link

how to open socket using IPv6 with zone id #216

Open Freednload opened 1 year ago

Freednload commented 1 year ago

I am wondering whether your library support IPv6 address with zone id like fe80::1642:fcff:fee9:434b%lanbr0 ? I searched your document but could not find information regarding IPv6 address.

The JS Websocket API does not accept IPv6 with zone id. It throws error: Failed to construct 'WebSocket': The URL 'ws://[fe80::1642:fcff:fee9:434b%lanbr0]:8080' is invalid.