connection: add negotiated_protocol function