From 0acdeb045f1bf6caae786c474d99cea68071f31f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 21 Jun 2006 22:50:21 +0000 Subject: Updated the readInput function to tell you how much time is left over after blocking. --- src/connection.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/connection.h') diff --git a/src/connection.h b/src/connection.h index efb8630..dd4112b 100644 --- a/src/connection.h +++ b/src/connection.h @@ -272,11 +272,16 @@ public: * Reads all pending input from the connection, blocking up to nSec * seconds and nUSec micro-seconds for the data. This uses select to * simulate blocking, but has the same effect as standard io blocking. - * If you don't want to block, just set both values to zero. + * If you don't want to block, just set both values to zero. The back + * parameters are optional, set to null to not use them. The variables + * you pass in through the back parameters will contain the remaining + * time if data arrived before the max timeout was reached. *@param nSec Max seconds to wait. *@param nUSec Max micro-seconds to wait. + *@param pnSecBack The number of seconds remaining. + *@param pnUSecBack The number of micro-seconds remaining. */ - bool readInput( int nSec, int nUSec ); + bool readInput( int nSec, int nUSec, int *pnSecBack=NULL, int *pnUSecBack=NULL ); /** Writes all data that is pending to the socket. *@returns True if all data was written succesfully, false otherwise. -- cgit v1.2.3