--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/luaevent/test/testClient.lua Sun Jun 10 16:01:26 2007 +0000 @@ -0,0 +1,15 @@ +require"luaevent" +require"socket" + +local function func() + print("ACTIVATED") + local sock = socket.tcp() + --sock: + sock = luaevent.wrap(sock) + print(assert(sock:connect("localhost", 20000))) + for i = 1, 100000 do assert(sock:send("Greet me ")) assert(sock:receive(10)) collectgarbage() end +end + +luaevent.addthread(func) + +luaevent.loop() \ No newline at end of file