From: John L. <jla...@gm...> - 2006-05-13 16:10:14
|
On 5/13/06, Steve Kieu <ha...@ya...> wrote: > I need to implement some sort of server and client ; and thinking about > using wxLuaSocket but find no sample code to get started. Quick reading t= he > doxygen output let me think most of the method in wxSocket has been > overwriten so it is not (I think) possible using it in wxSocket style. I = am 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. 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. 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. > 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? > I am not quite sure if some body can give me an advice which way to go; > > wxLuaSocket or luasocket? > > and if possible provive some sample code with wxLuaSocket to get started. > > My requirement is: > > A server listning to one TCP port and serves many client at the same time= ; > for each client spawn a wxClientSocket > to initiate the data transfer. (like the wxSocketServer and wxSocketClien= t > model) You're probably best off just searching for C++ examples of this and translating them to wxLua. Maybe there's some on the wxWidgets wiki? Good luck, John Labenski |