parameters: (self, protocols)
docstring: Sets up the ALPN protocols on the context.
function: def _set_alpn_protocols(self, protocols):
  
          """
  
          Sets up the ALPN protocols on the context.
  
          """
  
          if not protocols:
  
              return
  
          protocols_arr = _create_cfstring_array(protocols)
  
          try:
  
              result = Security.SSLSetALPNProtocols(self.context, protocols_arr)
  
              _assert_no_error(result)
  
          finally:
  
              CoreFoundation.CFRelease(protocols_arr)
function_tokens: def _set_alpn_protocols ( self , protocols ) : if not protocols : return protocols_arr = _create_cfstring_array ( protocols ) try : result = Security . SSLSetALPNProtocols ( self . context , protocols_arr ) _assert_no_error ( result ) finally : CoreFoundation . CFRelease ( protocols_arr )