8 #include "../../bscript/berror.h" 9 #include "../../bscript/impstr.h" 10 #include "../../clib/logfacility.h" 11 #include "../../clib/wnsckt.h" 12 #include "../../plib/systemstate.h" 13 #include "../uoexec.h" 25 using namespace Module;
37 using namespace Bscript;
42 continuing_offset( 0 ),
43 uoexec( static_cast<Core::
UOExecutor&>( exec ) )
53 return new BError(
"Socket is disconnected" );
61 const std::string& s = str->
value();
70 return new BLong( 1 );
82 return new BError(
"Invalid parameter type" );
92 return new BError(
"Socket is disconnected" );
101 const std::string& s = str->
value();
108 return new BLong( 1 );
120 return new BError(
"Invalid parameter type" );
137 return new BError(
"Invalid parameter type" );
147 QueryParamMap::iterator itr =
params_.find( str->
data() );
149 return new String( ( *itr ).second );
151 return new BLong( 0 );
155 return new BError(
"Invalid parameter type" );
168 if ( !query_string.empty() )
170 std::string::size_type brk;
171 std::string::size_type start = 0;
174 brk = query_string.find(
'&', start );
176 query_string.substr( start, ( brk == std::string::npos ) ? brk : brk - start );
178 std::string
name, value;
179 std::string::size_type eq = param.find(
'=' );
180 if ( eq != std::string::npos )
182 name = param.substr( 0, eq );
196 }
while ( brk != std::string::npos );
const std::string & value() const
std::vector< FunctionDef > FunctionTable
Bscript::BObjectImp * mf_QueryParam()
Core::UOExecutor & uoexec
int makeString(unsigned param)
Bscript::BObjectImp * mf_QueryIP()
std::string getpeername() const
Bscript::BObjectImp * mf_WriteHtmlRaw()
HttpExecutorModule(Bscript::Executor &exec, Clib::Socket &isck)
bool send_nowait(const void *vdata, unsigned datalen, unsigned *nsent)
std::vector< BObjectRef > fparams
void read_query_string(const std::string &query_string)
const String * getStringParam(unsigned param)
void http_writeline(Clib::Socket &sck, const std::string &s)
Bscript::BObjectImp * mf_WriteHtml()
std::string http_decodestr(const std::string &s)
const char * data() const
Module::OSExecutorModule * os_module
void SleepForMs(int msecs)