base on WebSocket and code by Golang