javascript - How to generate a websocket error -


i writing library has server , client components use websockets transport. i'm testing on variety of browsers , need test behaviors tied errors , sockets unexpectedly closing.

is there way cause error in websocket (aside trying connect invalid url/non-websocket server)?

note: not unit testing. need test how clients interact servers, within different browsers, mocking websockets not option.

you either close connection server side (in non-graceful manner) or might able stick proxy in middle (http://www.telerik.com/fiddler) , use clip socket if possible.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -