Functions | |
| int | StrBufTCP_read_line (StrBuf *buf, int *fd, int append, const char **Error) |
| Read a line from socket flushes and closes the FD on error. | |
| int | StrBufReadBLOB (StrBuf *Buf, int *fd, int append, long nBytes, const char **Error) |
| Input binary data from socket flushes and closes the FD on error. | |
| int | StrBufSipLine (StrBuf *LineBuf, StrBuf *Buf, const char **Ptr) |
| extract a "next line" from Buf; Ptr to persist across several iterations | |
| void | StrBufStripSlashes (StrBuf *Dir, int RemoveTrailingSlash) |
| removes double slashes from pathnames | |
Slow I/O; avoid.
| int StrBufReadBLOB | ( | StrBuf * | Buf, | |
| int * | fd, | |||
| int | append, | |||
| long | nBytes, | |||
| const char ** | Error | |||
| ) |
Input binary data from socket flushes and closes the FD on error.
| Buf | the buffer to get the input to | |
| fd | pointer to the filedescriptor to read | |
| append | Append to an existing string or replace? | |
| nBytes | the maximal number of bytes to read | |
| Error | strerror() on error |
extract a "next line" from Buf; Ptr to persist across several iterations
| LineBuf | your line will be copied here. | |
| Buf | BLOB with lines of text... | |
| Ptr | moved arround to keep the next-line across several iterations has to be &NULL on start; will be &NotNULL on end of buffer |
| void StrBufStripSlashes | ( | StrBuf * | Dir, | |
| int | RemoveTrailingSlash | |||
| ) |
removes double slashes from pathnames
| Dir | directory string to filter | |
| RemoveTrailingSlash | allows / disallows trailing slashes |
| int StrBufTCP_read_line | ( | StrBuf * | buf, | |
| int * | fd, | |||
| int | append, | |||
| const char ** | Error | |||
| ) |
Read a line from socket flushes and closes the FD on error.
| buf | the buffer to get the input to | |
| fd | pointer to the filedescriptor to read | |
| append | Append to an existing string or replace? | |
| Error | strerror() on error |
1.7.1