aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.cpp20
-rw-r--r--src/client.h4
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
127void Bu::Client::write( uint8_t nData )
128{
129 sWriteBuf.append( (const char *)&nData, sizeof(nData) );
130}
131
132void Bu::Client::write( uint16_t nData )
133{
134 sWriteBuf.append( (const char *)&nData, sizeof(nData) );
135}
136
137void Bu::Client::write( uint32_t nData )
138{
139 sWriteBuf.append( (const char *)&nData, sizeof(nData) );
140}
141
142void Bu::Client::write( uint64_t nData )
143{
144 sWriteBuf.append( (const char *)&nData, sizeof(nData) );
145}
146
127void Bu::Client::read( char *pData, int nBytes ) 147void 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