diff options
Diffstat (limited to 'src/wsocket.c')
-rw-r--r-- | src/wsocket.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wsocket.c b/src/wsocket.c index 30208b9..bf92a90 100644 --- a/src/wsocket.c +++ b/src/wsocket.c | |||
@@ -2,6 +2,13 @@ | |||
2 | * Socket compatibilization module for Win32 | 2 | * Socket compatibilization module for Win32 |
3 | * LuaSocket toolkit | 3 | * LuaSocket toolkit |
4 | * | 4 | * |
5 | * We also exchanged the order of the calls to send/recv and select. | ||
6 | * The idea is that the outer loop (whoever is calling sock_send/recv) | ||
7 | * will call the function again if we didn't time out, so we can | ||
8 | * call write and then select only if it fails. This moves the penalty | ||
9 | * to when data is not available, maximizing the bandwidth if data is | ||
10 | * always available. | ||
11 | * | ||
5 | * RCS ID: $Id$ | 12 | * RCS ID: $Id$ |
6 | \*=========================================================================*/ | 13 | \*=========================================================================*/ |
7 | #include <string.h> | 14 | #include <string.h> |