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:22:   //! @param _portno   //! 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 + //! @[Stdio.Port.bind] for more information   void create(function(Request:void) _callback,    void|int _portno,    void|string _interface, void|string key, -  void|string|array(string) certificate) +  void|string|array(string) certificate, +  void|int share)   {    portno=_portno;    if (!portno) portno=443; // default HTTPS port       callback=_callback;    interface=_interface;       port=MySSLPort();    port->set_default_keycert();    if( key && certificate )    port->add_cert( key, certificate );    -  if (!port->bind(portno,new_connection,[string]interface)) +  if (!port->bind(portno,new_connection,[string]interface,share))    error("HTTP.Server.SSLPort: failed to bind port %s%d: %s\n",    interface?interface+":":"",    portno,strerror(port->errno()));   }      //! Closes the HTTP port.   void close()   {    destruct(port);    port=0;