fixing socket send, and onmessage in client. it works!