diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-05-13 21:11:47 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-05-13 21:11:47 +0000 |
commit | 7ad392ce0426a040cc55713691bf6fdbf53c3d31 (patch) | |
tree | a50a7cb05f0d8550a7a37aa0cc3f3090250148e7 /src/tests/itoserver.cpp | |
parent | 093ef85e95d1b37e4a87ffc2a51433b2f1ed24e0 (diff) | |
download | libbu++-7ad392ce0426a040cc55713691bf6fdbf53c3d31.tar.gz libbu++-7ad392ce0426a040cc55713691bf6fdbf53c3d31.tar.bz2 libbu++-7ad392ce0426a040cc55713691bf6fdbf53c3d31.tar.xz libbu++-7ad392ce0426a040cc55713691bf6fdbf53c3d31.zip |
QueueBuf is updated, and everything else uses it now, including Client.
Unfortunately this breaks some programs that accessed the client internal
buffer directly. Overall it's much, much more efficient, so it's worth it,
maybe we'll find a good workaround later.
Diffstat (limited to '')
-rw-r--r-- | src/tests/itoserver.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tests/itoserver.cpp b/src/tests/itoserver.cpp index cf5f6d1..5f6e4fa 100644 --- a/src/tests/itoserver.cpp +++ b/src/tests/itoserver.cpp | |||
@@ -33,8 +33,12 @@ public: | |||
33 | virtual void onNewData( Bu::Client *pClient ) | 33 | virtual void onNewData( Bu::Client *pClient ) |
34 | { | 34 | { |
35 | TRACE(); | 35 | TRACE(); |
36 | pClient->write( pClient->getInput().getStr(), pClient->getInputSize() ); | 36 | char buf[1024]; |
37 | pClient->seek( pClient->getInputSize() ); | 37 | while( pClient->hasInput() ) |
38 | { | ||
39 | int iAmnt = pClient->read( buf, 1024 ); | ||
40 | pClient->write( buf, iAmnt ); | ||
41 | } | ||
38 | } | 42 | } |
39 | }; | 43 | }; |
40 | 44 | ||