aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/session.h')
-rw-r--r--src/daemon/session.h97
1 files changed, 0 insertions, 97 deletions
diff --git a/src/daemon/session.h b/src/daemon/session.h
index 24ddd641..0097a398 100644
--- a/src/daemon/session.h
+++ b/src/daemon/session.h
@@ -30,103 +30,6 @@
30#define SESSION_H 30#define SESSION_H
31 31
32 32
33struct MHD_Session {
34 struct MHD_Session * next;
35
36 struct MHD_Daemon * daemon;
37
38 struct MHD_HTTP_Header * headers_received;
39
40 struct MHD_Response * response;
41
42 char * method;
43
44 char * url;
45
46 /**
47 * Buffer for reading requests.
48 */
49 void * read_buffer;
50
51 /**
52 * Buffer for writing response.
53 */
54 void * write_buffer;
55
56 /**
57 * Foreign address (of length addr_len).
58 */
59 struct sockaddr_in * addr;
60
61 /**
62 * Thread for this session (if we are using
63 * one thread per connection).
64 */
65 pthread_t pid;
66
67 size_t read_buffer_size;
68
69 size_t readLoc;
70
71 size_t write_buffer_size;
72
73 size_t writeLoc;
74
75 /**
76 * Current write position in the actual response
77 * (excluding headers, content only; should be 0
78 * while sending headers).
79 */
80 size_t messagePos;
81
82 /**
83 * Remaining (!) number of bytes in the upload.
84 * Set to -1 for unknown (connection will close
85 * to indicate end of upload).
86 */
87 size_t uploadSize;
88
89 /**
90 * Length of the foreign address.
91 */
92 socklen_t addr_len;
93
94 /**
95 * Socket for this connection. Set to -1 if
96 * this connection has died (daemon should clean
97 * up in that case).
98 */
99 int socket_fd;
100
101 /**
102 * Have we finished receiving all of the headers yet?
103 * Set to 1 once we are done processing all of the
104 * headers. Note that due to pipelining, it is
105 * possible that the NEXT request is already
106 * (partially) waiting in the read buffer.
107 */
108 int headersReceived;
109
110 /**
111 * Have we finished receiving the data from a
112 * potential file-upload?
113 */
114 int bodyReceived;
115
116 /**
117 * Have we finished sending all of the headers yet?
118 */
119 int headersSent;
120
121 /**
122 * HTTP response code. Only valid if response object
123 * is already set.
124 */
125 unsigned int responseCode;
126
127};
128
129
130/** 33/**
131 * Obtain the select sets for this session. 34 * Obtain the select sets for this session.
132 * 35 *