listener: add negotiated_protocol function