Implement sendRequestToWS in the client.