written some code for proxy handling
This commit is contained in:
@ -83,6 +83,13 @@ struct qse_httpd_server_t
|
||||
qse_ubi_t handle;
|
||||
};
|
||||
|
||||
typedef struct qse_httpd_peer_t qse_httpd_peer_t;
|
||||
struct qse_httpd_peer_t
|
||||
{
|
||||
qse_nwad_t nwad;
|
||||
qse_ubi_t handle;
|
||||
};
|
||||
|
||||
enum qse_httpd_mux_mask_t
|
||||
{
|
||||
QSE_HTTPD_MUX_READ = (1 << 0),
|
||||
@ -107,6 +114,23 @@ struct qse_httpd_cbs_t
|
||||
int (*accept) (qse_httpd_t* httpd, qse_httpd_server_t* server, qse_httpd_client_t* client);
|
||||
} server;
|
||||
|
||||
struct
|
||||
{
|
||||
int (*open) (qse_httpd_t* httpd, qse_httpd_peer_t* peer);
|
||||
void (*close) (qse_httpd_t* httpd, qse_httpd_peer_t* peer);
|
||||
int (*connected) (qse_httpd_t* httpd, qse_httpd_peer_t* peer);
|
||||
|
||||
qse_ssize_t (*recv) (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_peer_t* peer,
|
||||
qse_mchar_t* buf, qse_size_t bufsize);
|
||||
|
||||
qse_ssize_t (*send) (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_peer_t* peer,
|
||||
const qse_mchar_t* buf, qse_size_t bufsize);
|
||||
} peer;
|
||||
|
||||
struct
|
||||
{
|
||||
void* (*open) (qse_httpd_t* httpd);
|
||||
@ -454,6 +478,14 @@ qse_httpd_task_t* qse_httpd_entasknph (
|
||||
qse_htre_t* req
|
||||
);
|
||||
|
||||
qse_httpd_task_t* qse_httpd_entaskproxy (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
const qse_httpd_task_t* pred,
|
||||
const qse_nwad_t* nwad,
|
||||
const qse_htre_t* req
|
||||
);
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
void* qse_httpd_allocmem (
|
||||
|
Reference in New Issue
Block a user