summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 6d7d81c..0e48285 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -58,6 +58,15 @@ void Bu::Client::processInput()
58 } 58 }
59} 59}
60 60
61void Bu::Client::processOutput()
62{
63 if( sWriteBuf.getSize() > 0 )
64 {
65 pSocket->write( sWriteBuf.getStr(), sWriteBuf.getSize() );
66 sWriteBuf.clear();
67 }
68}
69
61void Bu::Client::setProtocol( Protocol *pProto ) 70void Bu::Client::setProtocol( Protocol *pProto )
62{ 71{
63 this->pProto = pProto; 72 this->pProto = pProto;
@@ -78,3 +87,19 @@ Bu::FString &Bu::Client::getInput()
78 return sReadBuf; 87 return sReadBuf;
79} 88}
80 89
90Bu::FString &Bu::Client::getOutput()
91{
92 return sWriteBuf;
93}
94
95bool Bu::Client::isOpen()
96{
97 if( !pSocket ) return false;
98 return pSocket->isOpen();
99}
100
101void Bu::Client::write( const char *pData, int nBytes )
102{
103 sWriteBuf.append( pData, nBytes );
104}
105