From bd865cee5f89116c1f054cd0e5c275e97c2d0a9b Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 2 Jul 2007 20:35:44 +0000 Subject: The list has an isEmpty funcion, and the socket may have a new read function soon, check it out...later... --- src/list.h | 5 +++++ src/socket.cpp | 4 ++++ src/socket.h | 1 + 3 files changed, 10 insertions(+) (limited to 'src') diff --git a/src/list.h b/src/list.h index 6235619..e05ebbc 100644 --- a/src/list.h +++ b/src/list.h @@ -471,6 +471,11 @@ namespace Bu { return *pLast->pValue; } + + const bool isEmpty() const + { + return (nSize == 0); + } private: Link *pFirst; diff --git a/src/socket.cpp b/src/socket.cpp index 5a3097c..e567061 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -174,6 +174,10 @@ size_t Bu::Socket::read( void *pBuf, size_t nBytes ) return nRead; } +//size_t Bu::Socket::read( void *pBuf, size_t nBytes, uint32_t nTimeout ) +//{ +//} + size_t Bu::Socket::write( const void *pBuf, size_t nBytes ) { int nWrote = TEMP_FAILURE_RETRY( ::write( nSocket, pBuf, nBytes ) ); diff --git a/src/socket.h b/src/socket.h index 9e36041..c291549 100644 --- a/src/socket.h +++ b/src/socket.h @@ -21,6 +21,7 @@ namespace Bu virtual void close(); //virtual void read(); virtual size_t read( void *pBuf, size_t nBytes ); + virtual size_t read( void *pBuf, size_t nBytes, uint32_t nTimeout ); virtual size_t write( const void *pBuf, size_t nBytes ); virtual long tell(); -- cgit v1.2.3