diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/client.cpp | 20 | ||||
| -rw-r--r-- | src/client.h | 4 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp index 63822ba..2f293b7 100644 --- a/src/client.cpp +++ b/src/client.cpp | |||
| @@ -124,6 +124,26 @@ void Bu::Client::write( int64_t nData ) | |||
| 124 | sWriteBuf.append( (const char *)&nData, sizeof(nData) ); | 124 | sWriteBuf.append( (const char *)&nData, sizeof(nData) ); |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | void Bu::Client::write( uint8_t nData ) | ||
| 128 | { | ||
| 129 | sWriteBuf.append( (const char *)&nData, sizeof(nData) ); | ||
| 130 | } | ||
| 131 | |||
| 132 | void Bu::Client::write( uint16_t nData ) | ||
| 133 | { | ||
| 134 | sWriteBuf.append( (const char *)&nData, sizeof(nData) ); | ||
| 135 | } | ||
| 136 | |||
| 137 | void Bu::Client::write( uint32_t nData ) | ||
| 138 | { | ||
| 139 | sWriteBuf.append( (const char *)&nData, sizeof(nData) ); | ||
| 140 | } | ||
| 141 | |||
| 142 | void Bu::Client::write( uint64_t nData ) | ||
| 143 | { | ||
| 144 | sWriteBuf.append( (const char *)&nData, sizeof(nData) ); | ||
| 145 | } | ||
| 146 | |||
| 127 | void Bu::Client::read( char *pData, int nBytes ) | 147 | void Bu::Client::read( char *pData, int nBytes ) |
| 128 | { | 148 | { |
| 129 | memcpy( pData, sReadBuf.getStr()+nRBOffset, nBytes ); | 149 | memcpy( pData, sReadBuf.getStr()+nRBOffset, nBytes ); |
diff --git a/src/client.h b/src/client.h index b400bb3..1253dcd 100644 --- a/src/client.h +++ b/src/client.h | |||
| @@ -29,6 +29,10 @@ namespace Bu | |||
| 29 | void write( int16_t nData ); | 29 | void write( int16_t nData ); |
| 30 | void write( int32_t nData ); | 30 | void write( int32_t nData ); |
| 31 | void write( int64_t nData ); | 31 | void write( int64_t nData ); |
| 32 | void write( uint8_t nData ); | ||
| 33 | void write( uint16_t nData ); | ||
| 34 | void write( uint32_t nData ); | ||
| 35 | void write( uint64_t nData ); | ||
| 32 | void read( char *pData, int nBytes ); | 36 | void read( char *pData, int nBytes ); |
| 33 | long getInputSize(); | 37 | long getInputSize(); |
| 34 | 38 | ||
