multithreaded server
This commit is contained in:
+5
-5
@@ -15,17 +15,17 @@ RENDER()
|
||||
|
||||
<pre><?
|
||||
|
||||
t.set("string test");
|
||||
echo(string("string test: ") + t.to_string()+"\n");
|
||||
t.set("String test");
|
||||
echo(String("String test: ") + t.to_string()+"\n");
|
||||
|
||||
t.set(true);
|
||||
echo(string("bool test: ") + t.to_string()+"\n");
|
||||
echo(String("bool test: ") + t.to_string()+"\n");
|
||||
|
||||
t.set(1234.5678);
|
||||
echo(string("float test: ") + t.to_string()+"\n");
|
||||
echo(String("float test: ") + t.to_string()+"\n");
|
||||
|
||||
t.set(&t);
|
||||
echo(string("pointer test: ") + t.to_string()+"\n");
|
||||
echo(String("pointer test: ") + t.to_string()+"\n");
|
||||
|
||||
?></pre>
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
void show_stuff()
|
||||
{
|
||||
//context->header["Content-Type"] = "text/plain";
|
||||
//echo(to_string(time())+"\n");
|
||||
|
||||
<html>
|
||||
Mwahahaaha <?= time() ?>
|
||||
|
||||
@@ -24,7 +24,14 @@ RENDER()
|
||||
<li><a href="memcached.uce">Memcached</a></li>
|
||||
<li><a href="mysql.uce">MySQL Connector</a></li>
|
||||
</ul>
|
||||
<pre><?
|
||||
echo("Worker PID: "+std::to_string(my_pid)+"\n");
|
||||
echo("Parent PID: "+std::to_string(parent_pid)+" \n");
|
||||
?></pre>
|
||||
<pre><?= (var_dump(p)) ?></pre>
|
||||
</>
|
||||
|
||||
String test;
|
||||
test.assign(context->out);
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ RENDER()
|
||||
t["g"]["x"]["y4"] = "Ünicödä";
|
||||
t["l"] = context->params;
|
||||
|
||||
string j;
|
||||
String j;
|
||||
echo(j = json_encode(t));
|
||||
|
||||
?></pre>
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ RENDER()
|
||||
<label>MySQL Connection</label>
|
||||
<pre><?
|
||||
|
||||
string query = "SELECT * FROM :table WHERE x = :val";
|
||||
String query = "SELECT * FROM :table WHERE x = :val";
|
||||
StringMap params;
|
||||
params["table"] = "TableName";
|
||||
params["val"] = "Dubious\\Value'Name\nwith;breaks";
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ RENDER()
|
||||
</>
|
||||
|
||||
|
||||
string action = context->get["action"];
|
||||
String action = context->get["action"];
|
||||
if(context->cookies["uce-session"].length() > 0)
|
||||
session_start();
|
||||
if(action == "start")
|
||||
|
||||
Reference in New Issue
Block a user