add plugins

This commit is contained in:
LE Xuan Sang
2015-10-22 11:49:38 +02:00
parent af964b1896
commit 6f44fa9b58
8 changed files with 296 additions and 0 deletions

32
plugins/cookiex/cookiex.c Normal file
View File

@ -0,0 +1,32 @@
#include "../plugin.h"
void init();
call __init__ = init;
void init()
{
printf("Finish init\n");
}
void execute(int client,const char* method,dictionary rq)
{
/**
* Set cookie to the browser
*/
char* c = server_time();
dictionary d = dict();
dput(d,"test",c);
dput(d,"test1","This is another cookie");
set_cookie(client,d);
LOG("%s",c);
__t(client,"<h1>Set the cookie</h1>");
freedict(d);
}
void get(int client,const char* method,dictionary rq)
{
}

BIN
plugins/cookiex/cookiex.c.o Normal file

Binary file not shown.