a47e7117745b18388f54ebb9a85a55550d88788f
galt
  Wed Oct 23 09:56:36 2013 -0700
set network default read write timeout for tcp connections to browser defaults -- around 2 minutes=120 seconds. Specific applications  can call the new function setReadWriteTimeouts on an open socket if they need them to be longer or shorter.
diff --git src/inc/net.h src/inc/net.h
index b3edc00..fac2207 100644
--- src/inc/net.h
+++ src/inc/net.h
@@ -1,28 +1,33 @@
 /* Net.h some stuff to wrap around net communications. 
  *
  * This file is copyright 2002 Jim Kent, but license is hereby
  * granted for all use - public, private or commercial. */
 
 
 #ifndef NET_H
 #define NET_H
 
 #include "linefile.h"
 #include "dystring.h"
 
 #define DEFAULTCONNECTTIMEOUTMSEC 10000  /* default connect timeout for tcp in milliseconds */
+#define DEFAULTREADWRITETTIMEOUTSEC 120  /* default read/write timeout for tcp in seconds */
+
+int setReadWriteTimeouts(int sd, int seconds);
+/* Set read and write timeouts on socket sd 
+ * Return -1 if there are any errors, 0 if successful. */
 
 /* add a failure to connFailures[]
  *  which can save time and avoid more timeouts */
 int netConnect(char *hostName, int port);
 /* Start connection with a server having resolved port. Return < 0 if error. */
 
 int netMustConnect(char *hostName, int port);
 /* Start connection with server or die. */
 
 int netMustConnectTo(char *hostName, char *portName);
 /* Start connection with a server and a port that needs to be converted to integer */
 
 int netAcceptingSocket(int port, int queueSize);
 /* Create a socket for to accept connections. */