Where to write to (an HTTP request object on a client, or an HTTP response object on a server).
The data to be written.
The encoding for writing strings, can be null if all the chunks are node.js Buffer objects.
If true complete the HTTP message after the last data has been written, otherwise leave the HTTP message open for more sending.
The function to be called when the write completes (if lhttp_write() returns false).
Return true if the write completed immediately, otherwise return false and use doneCallback() to indicate write completion.
Write data to a client's HTTP request or to a server's HTTP response. After successful completion of an lhttp_write() with sendEnd false it's safe to call chan.write() or chan.end(); lhttp_write() assumes that the dataChunks array has a length of at least 1, and that every chunk has a byte length of at least 1 byte. If these assumptions aren't satisfied then lhttp_write() won't work correctly. Data chunks that are node.js Buffer objects are written unencoded, as is. Data chunks that are strings are encoded with the given encoding when written. If all the chunks can be sent immediately then doneCallback() isn't called, and lhttp_write() returns true to indicate successful completion of the write. If lhttp_write() must wait to send some chunks then it returns false, and doneCallback() is called later to indicate completion. If doneCallback() is called and something went wrong then the e parameter contains an Error object. Otherwise (if e is null) the write has completed successfully.