Roxen.git
/
server
/
plugins
/
protocols
/
http.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/plugins/protocols/http.pike:1:
// This is a ChiliMoon protocol module. // Modified by Francesco Chemolli to add throttling capabilities. // Copyright © 1996 - 2001, Roxen IS.
-
constant cvs_version = "$Id: http.pike,v 1.
411
2004/06/
19
23:
59
:
22
_cvs_stephen Exp $";
+
constant cvs_version = "$Id: http.pike,v 1.
412
2004/06/
23
00
:
32
:
11
_cvs_stephen Exp $";
//#define REQUEST_DEBUG //#define CONNECTION_DEBUG #define MAGIC_ERROR #define HTTPTIMEOUT 90 // HTTP protocol module. #include <config.h> #define TIMER_PREFIX "http:" #include <timers.h> #include <stat.h>
Roxen.git/server/plugins/protocols/http.pike:239:
conf->connection_add( this, pipe ); } void send(string|object what, int|void len, int|void start) { if(!what) return; if(!pipe) setup_pipe(); if( len>0 && port_obj && port_obj->minimum_byterate ) call_out( end, len / port_obj->minimum_byterate );
-
pipe->add_source(what,start,len
||sizeof(what
)
)
;
+
pipe->add_source(what,start,len
>0?len:-1
);
} void start_sender( ) { #ifdef FD_DEBUG call_out(timer, 30, predef::time(1)); // Update FD with time... #endif if( throttler || conf->throttler ) pipe->set_throttler( throttler || conf->throttler ); pipe->set_done_callback( shuff_do_log );