Sun, 10 Jun 2007 16:01:26 +0000
Initial commit:
* Created tree structure
* Committed current version
0 | 1 | require"luaevent" |
2 | require"socket" | |
3 | ||
4 | local function func() | |
5 | print("ACTIVATED") | |
6 | local sock = socket.tcp() | |
7 | --sock: | |
8 | sock = luaevent.wrap(sock) | |
9 | print(assert(sock:connect("localhost", 20000))) | |
10 | for i = 1, 100000 do assert(sock:send("Greet me ")) assert(sock:receive(10)) collectgarbage() end | |
11 | end | |
12 | ||
13 | luaevent.addthread(func) | |
14 | ||
15 | luaevent.loop() |