Changeset 16 in Main for trunk/Server/server.c
- Timestamp:
- Sep 14, 2024, 12:09:52 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/server.c
r15 r16 1 1 /* $Id$ */ 2 3 #define SOURCE 2 4 3 5 #include "tw_server.h" … … 5 7 #include "tw_ssl.h" 6 8 #include "tw_config.h" 9 #include "tw_http.h" 7 10 8 11 #include <unistd.h> … … 111 114 } 112 115 return 0; 116 } 117 118 size_t tw_read(SSL* ssl, int s, void* data, size_t len) { 119 if(ssl == NULL) { 120 return recv(s, data, len, 0); 121 } else { 122 return SSL_read(ssl, data, len); 123 } 124 } 125 126 size_t tw_write(SSL* ssl, int s, void* data, size_t len) { 127 if(ssl == NULL) { 128 return send(s, data, len, 0); 129 } else { 130 return SSL_write(ssl, data, len); 131 } 113 132 } 114 133 … … 140 159 sslworks = true; 141 160 } 161 struct tw_http_request req; 162 int ret = tw_http_parse(s, sock, &req); 142 163 cleanup: 143 if(sslworks) {164 if(sslworks) { 144 165 SSL_shutdown(s); 145 166 }
Note:
See TracChangeset
for help on using the changeset viewer.