thegrid
thegrid

Reputation: 514

Disable websockets on windows

I am working a project that involves a java client interacting with a socket.io based server over websockets. In order to test fallback from websockets to xhr-polling i need to simulate a websocket blocking on my windows host.

How can this be done ?

Upvotes: 1

Views: 5555

Answers (1)

Dmitry
Dmitry

Reputation: 1149

It is not trivial to disable websocket in Windows firewall. Disabling this protocol in browser is not a way - in case you want to test fallback when websocket supported by browser but blocked by firewall, antivirus, domain policy rules, ...

I've simulated this behaviour by running nodejs server with grunt-connect-proxy. By default it blocks ws:// protocol but you can easy enable it using

option.ws = true

Upvotes: 3

Related Questions