pike.git / lib / modules / Protocols.pmod / HTTP.pmod / Server.pmod / SSLPort.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Server.pmod/SSLPort.pike:23:   //! @param port   //! The port number to bind to, defaults to 443.   //! @param interface   //! The interface address to bind to.   //! @param key   //! An optional SSL secret key, provided in binary format, such   //! as that created by @[Standards.PKCS.RSA.private_key()].   //! @param certificate   //! An optional SSL certificate or chain of certificates with the host   //! certificate first, provided in binary format. - //! @param share - //! If true, the connection will be shared if possible. See + //! @param reuse_port + //! If true, enable SO_REUSEPORT if the OS supports it. See   //! @[Stdio.Port.bind] for more information   protected void create(function(Request:void) callback,    void|int port,    void|string interface,    void|string|Crypto.Sign.State key,    void|string|array(string) certificate, -  void|int share) +  void|int reuse_port)   {    ::create();       portno = port || 443;    this::callback=callback;    this::interface=interface;       if( key && certificate )    {    if( stringp(certificate) )    certificate = ({ certificate });    ctx->add_cert( key, certificate, ({"*"}) );    }    else    set_default_keycert();    -  if (!bind(portno, new_connection, this::interface, share)) +  if (!bind(portno, new_connection, this::interface, reuse_port))    error("Failed to bind port %s%d: %s\n",    interface?interface+":":"", portno, strerror(errno()));   }      protected void _destruct() { close(); }      //! The port accept callback   protected void new_connection()   {    SSL.File fd=accept();