diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-10-04 16:06:47 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-10-04 16:06:47 -0700 |
commit | 1cfd5c91b0a7d0d0009f4fece429f8c2cc6a501c (patch) | |
tree | 1e47ddf34d5d455ad6a56c65e2cf358c9622a48e /tests/enet_client.c | |
parent | 4a5d3521d7f72b8aded5d2bddd74d5541d1eff3f (diff) |
recvmsg and further socket debugging
Diffstat (limited to 'tests/enet_client.c')
-rw-r--r-- | tests/enet_client.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/enet_client.c b/tests/enet_client.c index f3101306..6eb088a3 100644 --- a/tests/enet_client.c +++ b/tests/enet_client.c @@ -6,6 +6,14 @@ ENetHost * host; void main_loop() { + static int counter = 0; + counter++; + if (counter == 20) { + printf("stop!\n"); + emscripten_cancel_main_loop(); + return; + } + ENetEvent event; if (enet_host_service (host, & event, 0) == 0) return; switch (event.type) @@ -81,12 +89,12 @@ int main (int argc, char ** argv) "var iframe = document.createElement('iframe');" "iframe.src = 'server.html';" "iframe.width = '100%';" - "iframe.height = '25%';" + "iframe.height = '33%';" "document.body.appendChild(iframe);" "console.log('added.');"); #endif - emscripten_set_main_loop(main_loop, 500); + emscripten_set_main_loop(main_loop, 1); return 1; } |