From: Steve K. <ha...@ya...> - 2006-05-13 21:52:14
|
wxLuaSocket is a C++ class for the wxLua app to communicate with a spawned wxLua process for debugging. It is not a generic socket class, nor is it wrapped for use in lua. Ah ok I understand it now, Thanks Here's the interface file for the socket classes of wxWidgets that wxLua wraps. You use them in wxLua as you would in C++, but I have to admit that I've never tried them. See the wxWidgets documentation. Great ; I will try this way http://wxlua.sourceforge.net/wxLua/bindings/wxwidgets/socket.i > thinking about using luasocket (kepler project) as well but their uses of > coroutine (copas) make me a bit uncomfortable :-). And me think wxLua Sorry never tried this either. couroutine in lua IMHO is not really a replacement for thread. But I think using it in wxLua is convinient enough to overcome the limitation; as if I have a lua_interp = new wxLuaState(NULL, wxID_ANY); and whenever I do a int retval=lua_interp->RunFile(lua_file); wxApp will spawn a new thread (?) to run the lua file and control return immediately. If this is correct then I can spawn several lua_file in OnInit() without blocking the GUI; and the lua_file might be for the server process, the GUI. Correct me if I am wrong please. > already provide wxLuaSocket why not using it (even it is not easy to not > link with it anyway) I don't know know what you mean by this? :-). If you enable wxLuaDebug then you need to enable wxLuaSocket and have to link your application with it even not using it, that is what I mean. But I can build the library only without debug and socket and wxlua, which is fine, just save about 400Kb of size though. Thank you very much. Cheers S.KIEU --------------------------------- On Yahoo!7 Answers: Real people ask and answer questions on any topic. |