Roxen.git / server / base_server / slowpipe.pike

version» Context lines:

Roxen.git/server/base_server/slowpipe.pike:3:   //   //   // A throttling pipe connection   //      // Hm... storing the stuff to send in a string might lead to problems on   // ftp-servers. Will have to be changed. Also, reading stuff from disk   // on demand might be very interesting to save memory and increase   // performance. We'll see.    - constant cvs_version="$Id: slowpipe.pike,v 1.16 2009/05/07 14:15:53 mast Exp $"; + constant cvs_version="$Id$";      #ifdef THROTTLING_DEBUG   #undef THROTTLING_DEBUG   #define THROTTLING_DEBUG(X) if(file_len>0x6fffffff)report_debug("slowpipe: "+X+"\n")   #else   #define THROTTLING_DEBUG(X)   #endif   private mapping status = ([]);   private Stdio.File outfd=0; //assigned by output   private string tosend="";
Roxen.git/server/base_server/slowpipe.pike:65:   void input (Stdio.File what, int len) {    THROTTLING_DEBUG("adding file input: len="+len);    if (len<=0)    file_len=0x7fffffff;    else    {    status->len = len;    file_len = len;    }    fd_in = what; +  +  if (fd_in->set_nonblocking) // doesn't exist for some virtual file types    fd_in->set_nonblocking(); -  +    // tosend+=what->read(len);   }      // This mapping will be updated when data is sent.   void set_status_mapping( mapping m )   {    foreach( indices( status ), string x )    m[x] = status[x];    status = m;    status->start = time();