summaryrefslogtreecommitdiffhomepage
path: root/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/stream.c b/stream.c
index eac89a8..d456619 100644
--- a/stream.c
+++ b/stream.c
@@ -28,9 +28,23 @@ int stream_push_new(lua_State * L, const int fd)
lua_pushliteral(L, "__index");
lua_createtable(L, 0, 1);
- lua_pushliteral(L, "read");
- lua_pushcfunction(L, stream_read);
- lua_rawset(L, -3);
+ {
+ lua_pushliteral(L, "read");
+ lua_pushcfunction(L, stream_read);
+ lua_rawset(L, -3);
+
+ lua_pushliteral(L, "skip");
+ lua_pushnil(L); // TODO: Implement skipping in input buffer.
+ lua_rawset(L, -3);
+
+ lua_pushliteral(L, "write");
+ lua_pushnil(L); // TODO: Implement writing operation.
+ lua_rawset(L, -3);
+
+ lua_pushliteral(L, "flush");
+ lua_pushnil(L); // TODO: Implement flush for output buffer.
+ lua_rawset(L, -3);
+ }
lua_rawset(L, -3);
}