aboutsummaryrefslogtreecommitdiff
path: root/src/connection.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-25 20:24:31 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-25 20:24:31 +0000
commit0c2d075e795858779af102e932a881498e2268ae (patch)
treee4cab130b72997bd76af1cde4d9bbe3f5de343d3 /src/connection.h
parentec1a4f20eace44b6ffde4c1eacdecf3938942cd4 (diff)
downloadlibbu++-0c2d075e795858779af102e932a881498e2268ae.tar.gz
libbu++-0c2d075e795858779af102e932a881498e2268ae.tar.bz2
libbu++-0c2d075e795858779af102e932a881498e2268ae.tar.xz
libbu++-0c2d075e795858779af102e932a881498e2268ae.zip
Added a new exception for connecitons, and added a new function to the
connection class, that reads at least n bytes in x seconds.
Diffstat (limited to '')
-rw-r--r--src/connection.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/connection.h b/src/connection.h
index 29fcc25..5e86ff4 100644
--- a/src/connection.h
+++ b/src/connection.h
@@ -283,6 +283,18 @@ public:
283 */ 283 */
284 bool readInput( int nSec, int nUSec, int *pnSecBack=NULL, int *pnUSecBack=NULL ); 284 bool readInput( int nSec, int nUSec, int *pnSecBack=NULL, int *pnUSecBack=NULL );
285 285
286 /**
287 * Waits until at least nBytesIn are read into the input buffer and ready
288 * to be used. Wait at most nSec seconds plus nUSec micro seconds.
289 * If the timeout is exceeded, this function throws an exception. If this
290 * function returns normally, you are guranteed to have at least nBytesIn
291 * bytes in your input buffer.
292 *@param nBytesIn Number of bytes to read.
293 *@param nSec The max seconds to wait.
294 *@param sUSec The max microseconds to wait.
295 */
296 void waitForInput( int nBytesIn, int nSec, int nUSec );
297
286 /** Writes all data that is pending to the socket. 298 /** Writes all data that is pending to the socket.
287 *@returns True if all data was written succesfully, false otherwise. 299 *@returns True if all data was written succesfully, false otherwise.
288 */ 300 */