[WIP] Add ws event new

targets #358 
Does not `free()` the allocated memory here.

Maybe you should provide a follow-up patch to fix this.