'Specify a callback function that will be called when offering `Next
Protocol Negotiation
<https://technotes.googlecode.com/git/nextprotoneg.html>`_ as a server.
:param callback: The callback function.  It will be invoked with one
argument, the Connection instance.  It should return a list of
bytestrings representing the advertised protocols, like
``[b\'http/1.1\', b\'spdy/2\']``.'

@_requires_npn
def set_npn_advertise_callback(self, callback):

    self._npn_advertise_helper = _NpnAdvertiseHelper(callback)
    self._npn_advertise_callback = self._npn_advertise_helper.callback
    _lib.SSL_CTX_set_next_protos_advertised_cb(self._context, self._npn_advertise_callback, _ffi.NULL)
