diff options
-rw-r--r-- | stream.c | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -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); } |