On Thu, 29 Oct 2020 10:16:36 +0000 José Miguel Sánchez García <[email protected]> wrote:
Dear José, > The bare minimum has been implemented, it is currently unused. It > allows the server to maintain a stateful connection with the client. > Also, keep-alive connections are more efficient than successive > request/response pairs of connections. thanks for your patch, but this can definitely be implemented much simpler. It's sufficient to have a "binary" field "int keepalive" in the response struct and set it when we prepare the request-struct (defaulting to 0 of course, i.e. close) depending on the request-fields. There's no need to add new data-structures or anything. At the end of serve(), we then check the response-struct and either close the connection or return to receiving the header. I respect your systematic approach, but it's not like there will be any more than a binary state (close or keep-alive) to this process. I'd love to chime in further, but I've got a lot to do at the moment and definitely have the keep-alive-connections as a big thing on my todo-list. With best regards Laslo
