Protocol¶
Types¶
Note
These were in ymo_proto_http.c, but moved here to make testing a little easier…
Functions¶
- 
ymo_status_t ymo_proto_http_init(ymo_proto_t *proto, ymo_server_t *server)¶
- 
void ymo_proto_http_cleanup(ymo_proto_t *proto, ymo_server_t *server)¶
- 
void *ymo_proto_http_conn_init(void *proto_data, ymo_conn_t *conn)¶
- 
void ymo_proto_http_conn_cleanup(void *proto_data, ymo_conn_t *conn, void *conn_data)¶
- 
ssize_t ymo_proto_http_read(void *proto_data, ymo_conn_t *conn, void *conn_data, char *recv_buf, size_t len)¶
- HTTP Parse main entry point. - Parameters
- server – ymo_server issuing the parse exchange 
- session – HTTP session we’re parsing 
- proto_data – HTTP-specific data created by proto init 
- recv_buf – server read buffer 
- len – number of bytes in recv_buf 
 
- Returns
- number of bytes parsed on success, -1 on failure. 
 
- 
ymo_status_t ymo_proto_http_write(void *proto_data, ymo_conn_t *conn, void *conn_data, int socket)¶
- HTTP protocol write callback 
- 
ssize_t ymo_proto_http_handle_error(ymo_http_session_t *session, ymo_http_exchange_t *exchange, ymo_conn_t *conn, ymo_status_t status)¶