pike.git / lib / modules / Remote.pmod / Server.pike

version» Context lines:

pike.git/lib/modules/Remote.pmod/Server.pike:51:    }   }      void got_connection(object f)   {    object c = f->accept();    c->set_blocking();    object con = Connection(0, max_call_threads);    object ctx = Context(gethostname()+"-"+portno);    if (!c) -  error("Failed to accept connection: %s\n", strerror (f->errno())); +  error("Failed to accept connection: %s.\n", strerror (f->errno()));    con->start_server(c, ctx);    ctx->set_server_context(sctx, con);    connections += ({ con });   }      //! @decl void create(string host, int port, void|int max_call_threads)   //! Create a @[Remote.Server].   //!   //! @param host   //! @param port
pike.git/lib/modules/Remote.pmod/Server.pike:75:   //! Maximum number of concurrent threads.   void create(string host, int p, void|int _max_call_threads)   {    portno = p;    max_call_threads = _max_call_threads;    port = Stdio.Port();    port->set_id(port);    if(host)    {    if(!port->bind(p, got_connection, host)) -  error("Failed to bind port: %s\n", strerror (port->errno())); +  error("Failed to bind port: %s.\n", strerror (port->errno()));    }    else if(!port->bind(p, got_connection)) -  error("Failed to bind port: %s\n", strerror (port->errno())); +  error("Failed to bind port: %s.\n", strerror (port->errno()));       DEBUGMSG("listening to " + host + ":" + p + "\n");       if(!portno)    sscanf(port->query_address(), "%*s %d", portno);       sctx = Minicontext();   }      //! Provide a named @[thing] to the @[Remote.Client](s).
pike.git/lib/modules/Remote.pmod/Server.pike:122:    destruct (port);    foreach (connections, object conn) conn->close();   }      //! Check if the @[Remote.Server] is closed.   int closed()   {    return !!port;   }    - void destroy() + protected void _destruct()   {    DEBUGMSG("destruct" + (port ? " - closing listening port\n" : "\n"));    catch (destruct (port));   }