diff src/protocol.h @ 144:8b9366fc1361 noffle

[svn] Added timeout to Prt_getLn to avoid Noffle hanging if the connection breaks down during a fetch.
author enz
date Sat, 23 Sep 2000 11:40:35 +0100
parents 6f681d41734c
children 1c7303c71f66
line wrap: on
line diff
--- a/src/protocol.h	Sat Sep 23 11:37:01 2000 +0100
+++ b/src/protocol.h	Sat Sep 23 11:40:35 2000 +0100
@@ -4,7 +4,7 @@
   Functions related with the NNTP protocol which are useful for both
   the server and the client.
 
-  $Id: protocol.h 155 2000-06-24 20:28:01Z bears $
+  $Id: protocol.h 217 2000-09-23 10:40:35Z enz $
 */
 
 #ifndef PRT_H
@@ -58,16 +58,18 @@
 /* 
    Read next line from f into Str, up to "\n" or "\r\n". Don't save "\n"
    or "\r\n" in line. Terminate with '\0'. 
+   If timeoutSeconds < 0, no timeout alarm is used.
 */
 Bool
-Prt_getLn( Str line, FILE *f );
+Prt_getLn( Str line, FILE *f, int timeoutSeconds );
 
 /*
   Read a text line from server. Returns TRUE if line != ".", removes
   leading '.' otherwise.
+   If timeoutSeconds < 0, no timeout alarm is used.
 */
 Bool
-Prt_getTxtLn( Str line, Bool *err, FILE *f );
+Prt_getTxtLn( Str line, Bool *err, FILE *f, int timeoutSeconds );
 
 /*
   Write text line to f. Escape "." at the beginning with another ".".