Implemented RPC for websocket