Making ws_getsocket take the onmessage callback instead.