diff options
| author | Alexander Pickering <alex@cogarr.net> | 2018-09-10 23:11:08 -0400 |
|---|---|---|
| committer | Alexander Pickering <alex@cogarr.net> | 2018-09-10 23:11:08 -0400 |
| commit | c38d5eca7091fc7f0206ed0c746622022b2ae508 (patch) | |
| tree | 8c01d4a941b4152675354b8b7a46c0906e9fb40c /src/shared/lua_api/load_net.cpp | |
| parent | b3c0d2ead1f384b35615be562c5f06804e8990cb (diff) | |
| download | brokengine-c38d5eca7091fc7f0206ed0c746622022b2ae508.tar.gz brokengine-c38d5eca7091fc7f0206ed0c746622022b2ae508.tar.bz2 brokengine-c38d5eca7091fc7f0206ed0c746622022b2ae508.zip | |
Added documentation
Also added treeview guielemnt
Also added ifilesystem guielement
Also added io library
Diffstat (limited to 'src/shared/lua_api/load_net.cpp')
| -rw-r--r-- | src/shared/lua_api/load_net.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/shared/lua_api/load_net.cpp b/src/shared/lua_api/load_net.cpp index cc2db02..4baf952 100644 --- a/src/shared/lua_api/load_net.cpp +++ b/src/shared/lua_api/load_net.cpp @@ -201,6 +201,13 @@ int lstream_writedouble(lua_State* L){ return 0; } +/*** +Get the pipe from this stream. +Gets the pipe from this stream, using the return value can be used with setpipe() +later to identify clients of a PAIR pipe +@function stream:getpipe() +@treturn pipe The pipe connected to the associated stream +*/ //stream:getpipe() :: pipe int lstream_getpipe(lua_State* L){ lua_getfield(L,-1,"data");//{stream},ud_stream @@ -212,6 +219,12 @@ int lstream_getpipe(lua_State* L){ return 1; } +/*** +Sets the pipe for the stream. +Sets the pipe for the stream, so that content is delivered to a specific client. +@function stream:setpipe() +@tparam pipe pipe The pipe for the specific client, gotten with stream:getpipe() +*/ //stream:setpipe(pipe) int lstream_setpipe(lua_State* L){ lua_getfield(L,-1,"pipe");//{stream},{pipe},ud_pipe @@ -300,8 +313,8 @@ void gameloop_net(lua_State* L){ luaL_getmetatable(L,"net.stream");//func,{data=stream} lua_setmetatable(L,-2);//func,{stream} lua_call(L,1,0);// - printf("Finished calling gameloop\n"); - nng_free(buf,size); + __mingw_printf("Finished calling gameloop, buf is %p, size is %zu\n",buf,size); + nng_msg_free(msgp); printf("called nn_freemsg\n"); free(stream);//We manually set stream->data so free_stream would crash here printf("Called free on stream\n"); |
