Personally I'd figure out which bit of the current module is slow (probably the masking) and implement just that part.
But if you did want to implement a WS module you'd be better off adding the functionality to socketserver.c as a new type of socket.
socketserver.c
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Personally I'd figure out which bit of the current module is slow (probably the masking) and implement just that part.
But if you did want to implement a WS module you'd be better off adding the functionality to
socketserver.c
as a new type of socket.