-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Milestone
Description
Short Description
A small client library is needed for a) performance tests and b) globally for HTTP/1.2 request processing.
Detailed Description
The following socket processing has to be performed, after the "Content-Length" HTTP-Header has been read out and the End-Byte position has been calculated.
while (Parser.position != EndBytePos) {
int rc = read(Socket, Buffer, BufferSize);
errnr = errno;
if (rc < 0 && errnr == EAGAIN) { //-repeat }
if (rc < 0 && errnr != EAGAIN) { /* set error */ break; }
if (rc == 0) { /* set error, con closed */ break; }
if (rc > 0 ) { append_buffer(); }
if (timeout) { /* set error timeout */ break; }
}Also keep in mind: Closing a TCP-Connection needs:
- shutdown
- loop on read()
- close()
Implementation Proposal
Implementation should be done using libevent in /lib/event.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo