Roxen.git / server / etc / modules / RoxenRPC.pmod / Server.pike

version» Context lines:

Roxen.git/server/etc/modules/RoxenRPC.pmod/Server.pike:1:   /* -  * $Id: Server.pike,v 1.19 2008/05/12 13:31:04 mast Exp $ +  * $Id$    */      #define CHECK_IO_ERROR(FD, OP) do { \    if (int err = (FD)->errno()) \    error ("Error " OP " to %O: %s\n", (FD), strerror (err)); \    } while (0)      class Connection   {   #define WAITING 0
Roxen.git/server/etc/modules/RoxenRPC.pmod/Server.pike:172:    }    }          object thread;    void set_threaded(int to)    {    if(!to && thread)    error("Cannot change from threaded operation to non-threaded.\n");    if(to) - #if !efun(thread_create) -  error("Cannot use threads, there are none in pike\n"); - #else +     {    client->set_nonblocking();    client->set_read_callback(0);    client->set_write_callback(write_data);    client->set_close_callback(0);    thread=thread_create(handler_thread);    } - #endif +     else    client->set_nonblocking(got_data, write_data, done_data);       }          void create(object c, object m)    {    master = m;    refs = master->refs;