This repository was archived by the owner on Feb 6, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
#ifndef http_h
2
2
#define http_h
3
3
4
+ #include "stddef.h"
5
+
4
6
typedef struct http_stream_s http_stream ;
5
7
typedef struct http_session_s http_session ;
6
8
typedef struct http_message_s http_message ;
7
9
8
10
typedef int (* http_stream_cb )(http_stream * stream , void * context );
9
11
12
+ enum http_error_codes {
13
+ HTTP_ENOTIMPL // Not yet implemented.
14
+ };
15
+
10
16
// Streams provide an interface for writing data to the socket
11
17
// bound to a session. They are responsible for handling any
12
18
// encoding/decoding of the data. Data will be written or read from
@@ -19,6 +25,7 @@ size_t http_stream_write(const char* buffer, size_t size);
19
25
// A session represents a connection between a client and the server.
20
26
// Create a socket connected to the server or accept incoming client
21
27
// from listening socket. Initialize a new HTTP session using this socket.
28
+ // Closing the session also closes the underlying socket.
22
29
http_session * http_session_init (int sockfd );
23
30
void http_session_close (http_session * session );
24
31
You can’t perform that action at this time.
0 commit comments