diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-07-02 20:35:44 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-07-02 20:35:44 +0000 |
commit | bd865cee5f89116c1f054cd0e5c275e97c2d0a9b (patch) | |
tree | e3e27a6b9bd5e2be6150088495c91fc91786ad9d /src | |
parent | 62fb9ee2ff8b1d9590c92a703d6506de6aa8df52 (diff) | |
download | libbu++-bd865cee5f89116c1f054cd0e5c275e97c2d0a9b.tar.gz libbu++-bd865cee5f89116c1f054cd0e5c275e97c2d0a9b.tar.bz2 libbu++-bd865cee5f89116c1f054cd0e5c275e97c2d0a9b.tar.xz libbu++-bd865cee5f89116c1f054cd0e5c275e97c2d0a9b.zip |
The list has an isEmpty funcion, and the socket may have a new read function
soon, check it out...later...
Diffstat (limited to 'src')
-rw-r--r-- | src/list.h | 5 | ||||
-rw-r--r-- | src/socket.cpp | 4 | ||||
-rw-r--r-- | src/socket.h | 1 |
3 files changed, 10 insertions, 0 deletions
@@ -471,6 +471,11 @@ namespace Bu | |||
471 | { | 471 | { |
472 | return *pLast->pValue; | 472 | return *pLast->pValue; |
473 | } | 473 | } |
474 | |||
475 | const bool isEmpty() const | ||
476 | { | ||
477 | return (nSize == 0); | ||
478 | } | ||
474 | 479 | ||
475 | private: | 480 | private: |
476 | Link *pFirst; | 481 | 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 ) | |||
174 | return nRead; | 174 | return nRead; |
175 | } | 175 | } |
176 | 176 | ||
177 | //size_t Bu::Socket::read( void *pBuf, size_t nBytes, uint32_t nTimeout ) | ||
178 | //{ | ||
179 | //} | ||
180 | |||
177 | size_t Bu::Socket::write( const void *pBuf, size_t nBytes ) | 181 | size_t Bu::Socket::write( const void *pBuf, size_t nBytes ) |
178 | { | 182 | { |
179 | int nWrote = TEMP_FAILURE_RETRY( ::write( nSocket, pBuf, nBytes ) ); | 183 | 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 | |||
21 | virtual void close(); | 21 | virtual void close(); |
22 | //virtual void read(); | 22 | //virtual void read(); |
23 | virtual size_t read( void *pBuf, size_t nBytes ); | 23 | virtual size_t read( void *pBuf, size_t nBytes ); |
24 | virtual size_t read( void *pBuf, size_t nBytes, uint32_t nTimeout ); | ||
24 | virtual size_t write( const void *pBuf, size_t nBytes ); | 25 | virtual size_t write( const void *pBuf, size_t nBytes ); |
25 | 26 | ||
26 | virtual long tell(); | 27 | virtual long tell(); |