'Get the protocol that was negotiated by NPN.'

@_requires_npn
def get_next_proto_negotiated(self):

    data = _ffi.new('unsigned    char    **')
    data_len = _ffi.new('unsigned    int    *')
    _lib.SSL_get0_next_proto_negotiated(self._ssl, data, data_len)
    return _ffi.buffer(data[0], data_len[0])[:]
