Data Structures | Typedefs
stream.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <uv.h>
#include "nvim/event/loop.h"
#include "nvim/rbuffer.h"

Go to the source code of this file.

Data Structures

struct  stream
 

Typedefs

typedef struct stream Stream
 
typedef void(* stream_read_cb) (Stream *stream, RBuffer *buf, size_t count, void *data, bool eof)
 
typedef void(* stream_write_cb) (Stream *stream, void *data, int status)
 
typedef void(* stream_close_cb) (Stream *stream, void *data)
 

Typedef Documentation

typedef struct stream Stream
typedef void(* stream_close_cb) (Stream *stream, void *data)
typedef void(* stream_read_cb) (Stream *stream, RBuffer *buf, size_t count, void *data, bool eof)

Type of function called when the Stream buffer is filled with data

Parameters
streamThe Stream instance
bufThe associated RBuffer instance
countNumber of bytes that was read.
dataUser-defined data
eofIf the stream reached EOF.
typedef void(* stream_write_cb) (Stream *stream, void *data, int status)

Type of function called when the Stream has information about a write request.

Parameters
streamThe Stream instance
dataUser-defined data
status0 on success, anything else indicates failure