summaryrefslogtreecommitdiffhomepage
path: root/stream.h
blob: 92df502898d51e2f62cd23a1666cb83be11041ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <lua.h>

#include "buffer.h"

struct stream
{
	int fd;
	struct buffer in;
	struct buffer out;
};

int stream_push_new(lua_State *, const int);
int stream_gc(lua_State *);
int stream_read(lua_State *);
int stream_readk(lua_State *, const int, lua_KContext);
int stream_write(lua_State *);
int stream_flush(lua_State *);
int stream_flushk(lua_State *, const int, lua_KContext);
int stream_discard(lua_State *);