Go to the source code of this file.
Classes | |
| struct | FDBuf |
Defines | |
| #define | FDBUF_ERR (-1) /**< Low-level error, examine errno */ |
| #define | FDBUF_AGAIN (-2) /**< Convenience for EAGAIN */ |
| #define | FDBUF_EOF (-3) /**< End-Of-File or remote termination */ |
| #define | FDBUF_NVAL (-4) /**< Invalid argument */ |
Typedefs | |
| typedef int(* | FDBufRead )(int fd, void *buf, size_t len, void *udata) |
Functions | |
| EXTERN_C_BEGIN LIBGIFT_EXPORT FDBuf * | fdbuf_new (int fd, FDBufRead readfn, FDBufRead peekfn, void *udata) |
| LIBGIFT_EXPORT void | fdbuf_free (FDBuf *buf) |
| LIBGIFT_EXPORT int | fdbuf_fill (FDBuf *buf, int bufsize) |
| LIBGIFT_EXPORT int | fdbuf_delim (FDBuf *buf, char *delim) |
| LIBGIFT_EXPORT void | fdbuf_release (FDBuf *buf) |
| LIBGIFT_EXPORT unsigned char * | fdbuf_data (FDBuf *buf, size_t *len) |
This interface is intended to be used through a TCPC object. A buffer will be created on tcp_open or tcp_accept.
|
|
Convenience for EAGAIN |
|
|
End-Of-File or remote termination |
|
|
Low-level error, examine errno |
|
|
Invalid argument |
|
|
Prototype for the buffer read function.
|
|
||||||||||||
|
Accessor for the data segment filled into the buffer.
|
|
||||||||||||
|
Search for the specific delim string on the input buffers. This currently requires "peek" functionality on the file descriptor, and as such will only work on sockets. This is a bug and should be fixed.
|
|
||||||||||||
|
Fill the internal buffer up to bufsize.
|
|
|
Destroy a buffer instance. |
|
||||||||||||||||||||
|
Construct a new buffer instance. This should only be done once per file descriptor, as the object instance must persist in order to take advantage of the buffering.
|
|
|
Flush the currently populated buffer to begin anew. This does not invalidate the calling argument, merely the data buffers held within. |
1.3.7