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/rot13.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/rot13.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tests/rot13.cpp b/src/tests/rot13.cpp index 2326888..03ba385 100644 --- a/src/tests/rot13.cpp +++ b/src/tests/rot13.cpp | |||
@@ -67,8 +67,12 @@ public: | |||
67 | 67 | ||
68 | void onNewData( Bu::Client *pClient ) | 68 | void onNewData( Bu::Client *pClient ) |
69 | { | 69 | { |
70 | pClient->write( pClient->getInput().getStr(), pClient->getInputSize() ); | 70 | char buf[1024]; |
71 | pClient->seek( pClient->getInputSize() ); | 71 | while( pClient->hasInput() ) |
72 | { | ||
73 | int iAmnt = pClient->read( buf, 1024 ); | ||
74 | pClient->write( buf, iAmnt ); | ||
75 | } | ||
72 | } | 76 | } |
73 | }; | 77 | }; |
74 | 78 | ||