I knew the cause of the problem.
If I use ws: // in the URL, I get a 301 error if the actual server uses wss: //.
If I use wss: // in the URL, Connect is success.
The default WebSocket handles this automatically, but Rebex WebSocket does not seem to handle it automatically.