|
|
|
|
@ -64,7 +64,7 @@ int WebServerClient::Accept (TCP *socket) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief Read data from the network fill in the buffer. The Request must be handled from the server
|
|
|
|
|
/// @return 0 no data , 1 request complete
|
|
|
|
|
/// @return pointer to the request buffer
|
|
|
|
|
WebRequestBuffer *WebServerClient::Loop () {
|
|
|
|
|
int len;
|
|
|
|
|
|
|
|
|
|
@ -434,13 +434,13 @@ int WebServer::Stop() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @brief Checks for new connections and for data on any connected webclient
|
|
|
|
|
/// @return -2 client could not connect, -1 on max connections, 0 on error, 1 no error
|
|
|
|
|
/// @return -3 general error, -2 client could not connect, -1 max connections, 1 request
|
|
|
|
|
int WebServer::Loop() {
|
|
|
|
|
list<WebServerClient*>::iterator wci;
|
|
|
|
|
WebServerClient *webclient;
|
|
|
|
|
TCP *tcpclient = NULL;
|
|
|
|
|
int ssl_enabled = 1;
|
|
|
|
|
int res;
|
|
|
|
|
int res = 0;
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// any new connection?
|
|
|
|
|
@ -485,7 +485,7 @@ int WebServer::Loop() {
|
|
|
|
|
webclients.remove(webclient);
|
|
|
|
|
delete webclient;
|
|
|
|
|
wci = webclients.begin();
|
|
|
|
|
if (wci == webclients.end()) continue;
|
|
|
|
|
if (wci == webclients.end()) break;
|
|
|
|
|
}
|
|
|
|
|
else if (reqbuffer->RequestComplete()) {
|
|
|
|
|
if (HandleRequest(reqbuffer, *wci) == 1) {
|
|
|
|
|
@ -496,7 +496,7 @@ int WebServer::Loop() {
|
|
|
|
|
webclients.remove(webclient);
|
|
|
|
|
delete webclient;
|
|
|
|
|
wci = webclients.begin();
|
|
|
|
|
if (wci == webclients.end()) continue;
|
|
|
|
|
if (wci == webclients.end()) break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|