diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-06-21 22:50:21 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-06-21 22:50:21 +0000 |
commit | 0acdeb045f1bf6caae786c474d99cea68071f31f (patch) | |
tree | 280691a5ecd6d488822f73a90a4f26b5da7fe682 /src/connection.h | |
parent | 5f029cf734e1c84b7dcde8383bbc85aada08ee1c (diff) | |
download | libbu++-0acdeb045f1bf6caae786c474d99cea68071f31f.tar.gz libbu++-0acdeb045f1bf6caae786c474d99cea68071f31f.tar.bz2 libbu++-0acdeb045f1bf6caae786c474d99cea68071f31f.tar.xz libbu++-0acdeb045f1bf6caae786c474d99cea68071f31f.zip |
Updated the readInput function to tell you how much time is left over after
blocking.
Diffstat (limited to '')
-rw-r--r-- | src/connection.h | 9 |
1 files changed, 7 insertions, 2 deletions
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: | |||
272 | * Reads all pending input from the connection, blocking up to nSec | 272 | * Reads all pending input from the connection, blocking up to nSec |
273 | * seconds and nUSec micro-seconds for the data. This uses select to | 273 | * seconds and nUSec micro-seconds for the data. This uses select to |
274 | * simulate blocking, but has the same effect as standard io blocking. | 274 | * simulate blocking, but has the same effect as standard io blocking. |
275 | * If you don't want to block, just set both values to zero. | 275 | * If you don't want to block, just set both values to zero. The back |
276 | * parameters are optional, set to null to not use them. The variables | ||
277 | * you pass in through the back parameters will contain the remaining | ||
278 | * time if data arrived before the max timeout was reached. | ||
276 | *@param nSec Max seconds to wait. | 279 | *@param nSec Max seconds to wait. |
277 | *@param nUSec Max micro-seconds to wait. | 280 | *@param nUSec Max micro-seconds to wait. |
281 | *@param pnSecBack The number of seconds remaining. | ||
282 | *@param pnUSecBack The number of micro-seconds remaining. | ||
278 | */ | 283 | */ |
279 | bool readInput( int nSec, int nUSec ); | 284 | bool readInput( int nSec, int nUSec, int *pnSecBack=NULL, int *pnUSecBack=NULL ); |
280 | 285 | ||
281 | /** Writes all data that is pending to the socket. | 286 | /** Writes all data that is pending to the socket. |
282 | *@returns True if all data was written succesfully, false otherwise. | 287 | *@returns True if all data was written succesfully, false otherwise. |