summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/posix/AsynchIO.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2007-08-31 18:20:29 +0000
committerAndrew Stitcher <astitcher@apache.org>2007-08-31 18:20:29 +0000
commit655b3b5806bafdd784f6a9c242e26341bd6aeccc (patch)
tree01fe5108d9901b6c577a5930be6ca31a625300fd /cpp/src/qpid/sys/posix/AsynchIO.cpp
parentf5a1cf995f4956ec2dd83a60715b31ad065f7751 (diff)
downloadqpid-python-655b3b5806bafdd784f6a9c242e26341bd6aeccc.tar.gz
* Changes to make C++ client code use the asynchronous network IO
* Fixed up the test for buffer changes * Removed unused buffer operations git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571529 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/posix/AsynchIO.cpp')
-rw-r--r--cpp/src/qpid/sys/posix/AsynchIO.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/src/qpid/sys/posix/AsynchIO.cpp b/cpp/src/qpid/sys/posix/AsynchIO.cpp
index 2b462cbd7a..3512363d46 100644
--- a/cpp/src/qpid/sys/posix/AsynchIO.cpp
+++ b/cpp/src/qpid/sys/posix/AsynchIO.cpp
@@ -121,7 +121,7 @@ void AsynchIO::start(Poller::shared_ptr poller) {
DispatchHandle::startWatch(poller);
}
-void AsynchIO::queueReadBuffer(Buffer* buff) {
+void AsynchIO::queueReadBuffer(BufferBase* buff) {
assert(buff);
buff->dataStart = 0;
buff->dataCount = 0;
@@ -129,7 +129,7 @@ void AsynchIO::queueReadBuffer(Buffer* buff) {
DispatchHandle::rewatchRead();
}
-void AsynchIO::unread(Buffer* buff) {
+void AsynchIO::unread(BufferBase* buff) {
assert(buff);
if (buff->dataStart != 0) {
memmove(buff->bytes, buff->bytes+buff->dataStart, buff->dataCount);
@@ -141,7 +141,7 @@ void AsynchIO::unread(Buffer* buff) {
// Either queue for writing or announce that there is something to write
// and we should ask for it
-void AsynchIO::queueWrite(Buffer* buff) {
+void AsynchIO::queueWrite(BufferBase* buff) {
// If no buffer then don't queue anything
// (but still wake up for writing)
if (buff) {
@@ -163,11 +163,11 @@ void AsynchIO::queueWriteClose() {
/** Return a queued buffer if there are enough
* to spare
*/
-AsynchIO::Buffer* AsynchIO::getQueuedBuffer() {
+AsynchIO::BufferBase* AsynchIO::getQueuedBuffer() {
// Always keep at least one buffer (it might have data that was "unread" in it)
if (bufferQueue.size()<=1)
return 0;
- Buffer* buff = bufferQueue.back();
+ BufferBase* buff = bufferQueue.back();
buff->dataStart = 0;
buff->dataCount = 0;
bufferQueue.pop_back();
@@ -183,7 +183,7 @@ void AsynchIO::readable(DispatchHandle& h) {
// (Try to) get a buffer
if (!bufferQueue.empty()) {
// Read into buffer
- Buffer* buff = bufferQueue.front();
+ BufferBase* buff = bufferQueue.front();
bufferQueue.pop_front();
errno = 0;
int readCount = buff->byteCount-buff->dataCount;
@@ -239,7 +239,7 @@ void AsynchIO::writeable(DispatchHandle& h) {
// See if we've got something to write
if (!writeQueue.empty()) {
// Write buffer
- Buffer* buff = writeQueue.back();
+ BufferBase* buff = writeQueue.back();
writeQueue.pop_back();
errno = 0;
assert(buff->dataStart+buff->dataCount <= buff->byteCount);