An I/O stream for neo4j client.
More...
#include <neo4j-client.h>
An I/O stream for neo4j client.
◆ close
Close the stream.
This function should close the stream and deallocate memory associated with it.
- Parameters
-
- Returns
- 0 on success, or -1 on error (errno will be set).
◆ flush
Flush the output buffer of the iostream.
For unbuffered streams, this is a no-op.
- Parameters
-
- Returns
- 0 on success, or -1 on error (errno will be set).
◆ read
ssize_t(* neo4j_iostream::read) (struct neo4j_iostream *self, void *buf, size_t nbyte) |
Read bytes from a stream into the supplied buffer.
- Parameters
-
[self] | This stream. |
[buf] | A pointer to a memory buffer to read into. |
[nbyte] | The size of the memory buffer. |
- Returns
- The bytes read, or -1 on error (errno will be set).
◆ readv
ssize_t(* neo4j_iostream::readv) (struct neo4j_iostream *self, const struct iovec *iov, unsigned int iovcnt) |
Read bytes from a stream into the supplied I/O vector.
- Parameters
-
[self] | This stream. |
[iov] | A pointer to the I/O vector. |
[iovcnt] | The length of the I/O vector. |
- Returns
- The bytes read, or -1 on error (errno will be set).
◆ write
ssize_t(* neo4j_iostream::write) (struct neo4j_iostream *self, const void *buf, size_t nbyte) |
Write bytes to a stream from the supplied buffer.
- Parameters
-
[self] | This stream. |
[buf] | A pointer to a memory buffer to read from. |
[nbyte] | The size of the memory buffer. |
- Returns
- The bytes written, or -1 on error (errno will be set).
◆ writev
ssize_t(* neo4j_iostream::writev) (struct neo4j_iostream *self, const struct iovec *iov, unsigned int iovcnt) |
Write bytes to a stream ifrom the supplied I/O vector.
- Parameters
-
[self] | This stream. |
[iov] | A pointer to the I/O vector. |
[iovcnt] | The length of the I/O vector. |
- Returns
- The bytes written, or -1 on error (errno will be set).