39 HttpWriter
this = _this;
41 switch (this->state) {
49 this->current =
queueGet(this->queue);
54 if (this->nheader >
memGetSize(this->buffer)) {
55 ssize_t
size = this->nheader;
62 if (NULL != this->buffer) {
74 this->nbuffer - this->nheader);
77 this->buffer + this->nheader,
89 if (this->written >= this->nbuffer) {
90 size_t body_done = this->written - this->nheader;
92 start = this->current->body + body_done;
93 to_write = this->current->nbody - body_done;
95 start = this->buffer + this->written;
96 to_write = (this->nheader + this->nbody) - this->written;
105 this->written += written;
107 if (written != to_write) {
122 if (this->written >= this->nheader + this->current->nbody) {
141 delete(this->current);
144 delete(this->current);
149 return NULL == this->current ?
151 this->queue->nmsg + 1;
size_t memGetSize(void *)
ssize_t streamWrite(Stream, void *, size_t)
size_t httpMessageHeaderSizeGet(HttpMessage)
ssize_t httpWriterWrite(void *_this, Stream st)
char * httpMessageHeaderToString(HttpMessage, char *)
char httpMessageHasKeepAlive(HttpMessage)