|
PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
|
#include <happyhttp.h>
Public Member Functions | |
| Connection (const char *host, int port) | |
| ~Connection () | |
| void | setcallbacks (ResponseBegin_CB begincb, ResponseData_CB datacb, ResponseComplete_CB completecb, void *userdata) |
| void | connect () |
| void | close () |
| void | pump () |
| bool | outstanding () const |
| void | request (const char *method, const char *url, const char *headers[]=0, const unsigned char *body=0, int bodysize=0) |
| void | putrequest (const char *method, const char *url) |
| void | putheader (const char *header, const char *value) |
| void | putheader (const char *header, int numericvalue) |
| void | endheaders () |
| void | send (const unsigned char *buf, int numbytes) |
Protected Attributes | |
| ResponseBegin_CB | m_ResponseBeginCB |
| ResponseData_CB | m_ResponseDataCB |
| ResponseComplete_CB | m_ResponseCompleteCB |
| void * | m_UserData |
Friends | |
| class | Response |
Definition at line 145 of file happyhttp.h.
| happyhttp::Connection::Connection | ( | const char * | host, |
| int | port | ||
| ) |
Definition at line 229 of file happyhttp.cpp.
| happyhttp::Connection::~Connection | ( | ) |
Definition at line 298 of file happyhttp.cpp.
References close().
| void happyhttp::Connection::close | ( | ) |
Definition at line 278 of file happyhttp.cpp.
References close().
Referenced by close(), pump(), and ~Connection().
| void happyhttp::Connection::connect | ( | ) |
Definition at line 255 of file happyhttp.cpp.
References happyhttp::atoaddr(), happyhttp::BailOnSocketError(), and connect().
| void happyhttp::Connection::endheaders | ( | ) |
Definition at line 390 of file happyhttp.cpp.
References send().
|
inline |
| void happyhttp::Connection::pump | ( | ) |
Definition at line 433 of file happyhttp.cpp.
References happyhttp::BailOnSocketError(), close(), happyhttp::Response::completed(), happyhttp::datawaiting(), happyhttp::Response::notifyconnectionclosed(), and happyhttp::Response::pump().
Referenced by Test1(), Test2(), Test3(), Test4(), and Test5().
| void happyhttp::Connection::putheader | ( | const char * | header, |
| const char * | value | ||
| ) |
Definition at line 376 of file happyhttp.cpp.
Referenced by putheader(), putrequest(), request(), Test3(), Test4(), and Test5().
| void happyhttp::Connection::putheader | ( | const char * | header, |
| int | numericvalue | ||
| ) |
Definition at line 383 of file happyhttp.cpp.
References putheader().
| void happyhttp::Connection::putrequest | ( | const char * | method, |
| const char * | url | ||
| ) |
Definition at line 354 of file happyhttp.cpp.
References putheader(), and Response.
| void happyhttp::Connection::request | ( | const char * | method, |
| const char * | url, | ||
| const char * | headers[] = 0, |
||
| const unsigned char * | body = 0, |
||
| int | bodysize = 0 |
||
| ) |
Definition at line 303 of file happyhttp.cpp.
References endheaders(), putheader(), putrequest(), and send().
| void happyhttp::Connection::send | ( | const unsigned char * | buf, |
| int | numbytes | ||
| ) |
Definition at line 411 of file happyhttp.cpp.
References happyhttp::BailOnSocketError(), connect(), and send().
Referenced by endheaders(), request(), send(), Test3(), Test4(), and Test5().
| void happyhttp::Connection::setcallbacks | ( | ResponseBegin_CB | begincb, |
| ResponseData_CB | datacb, | ||
| ResponseComplete_CB | completecb, | ||
| void * | userdata | ||
| ) |
Definition at line 242 of file happyhttp.cpp.
References m_ResponseBeginCB, m_ResponseCompleteCB, m_ResponseDataCB, and m_UserData.
Referenced by Test1(), Test2(), Test3(), Test4(), and Test5().
|
friend |
Definition at line 147 of file happyhttp.h.
Referenced by putrequest().
|
protected |
Definition at line 217 of file happyhttp.h.
Referenced by setcallbacks().
|
protected |
Definition at line 219 of file happyhttp.h.
Referenced by setcallbacks().
|
protected |
Definition at line 218 of file happyhttp.h.
Referenced by setcallbacks().
|
protected |
Definition at line 220 of file happyhttp.h.
Referenced by setcallbacks().