neo4j_iostream Struct Reference

An I/O stream for neo4j client. More...

`#include <neo4j-client.h>`

## Data Fields

ssize_t(* | read )(struct neo4j_iostream *self, void *buf, size_t nbyte)
| Read bytes from a stream into the supplied buffer. More...
ssize_t(* | readv )(struct neo4j_iostream *self, const struct iovec *iov, unsigned int iovcnt)
| Read bytes from a stream into the supplied I/O vector. More...
ssize_t(* | write )(struct neo4j_iostream *self, const void *buf, size_t nbyte)
| Write bytes to a stream from the supplied buffer. More...
ssize_t(* | writev )(struct neo4j_iostream *self, const struct iovec *iov, unsigned int iovcnt)
| Write bytes to a stream ifrom the supplied I/O vector. More...
int(* | flush )(struct neo4j_iostream *self)
| Flush the output buffer of the iostream. More...
int(* | close )(struct neo4j_iostream *self)
| Close the stream. More...

## Detailed Description

An I/O stream for neo4j client.

## Field Documentation

## close

int(* neo4j_iostream::close) (struct neo4j_iostream *self)

Close the stream.

This function should close the stream and deallocate memory associated with it.

Parameters

  [self] | This stream.

Returns
  0 on success, or -1 on error (errno will be set).

## flush

int(* neo4j_iostream::flush) (struct neo4j_iostream *self)

Flush the output buffer of the iostream.

For unbuffered streams, this is a no-op.

Parameters

  [self] | This stream.

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).