diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-01-17 08:02:04 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-01-17 08:02:04 +0000 |
commit | 02ef4e7daae6bef629dcb568052755fb85ed2efc (patch) | |
tree | 3001b5d4429626e086b457ade7a899428fbfeb34 /src/wsocket.c | |
parent | 076451c75336b30e6152bd5c02f355db39107f7d (diff) | |
download | luasocket-02ef4e7daae6bef629dcb568052755fb85ed2efc.tar.gz luasocket-02ef4e7daae6bef629dcb568052755fb85ed2efc.tar.bz2 luasocket-02ef4e7daae6bef629dcb568052755fb85ed2efc.zip |
Trying to get rid of EINTR problems...
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> |