diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2008-07-29 20:27:28 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2008-07-29 20:27:28 +0000 |
| commit | d1a58e417bde9265a2141dcf71db88c8d7fbd455 (patch) | |
| tree | 75fe4b185c3690637e95b543efe987ee7a255385 /cpp/src/qpid/client | |
| parent | 9fb1b9ad28b5790bf4d782373d4138afa10a8bff (diff) | |
| download | qpid-python-d1a58e417bde9265a2141dcf71db88c8d7fbd455.tar.gz | |
Removed unused functions
Removed unused Thread and Socket functions
- These functions also cause problems with Solaris compilations
Remove unused client connector functionality
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@680833 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client')
| -rw-r--r-- | cpp/src/qpid/client/ConnectionImpl.cpp | 1 | ||||
| -rw-r--r-- | cpp/src/qpid/client/Connector.cpp | 49 | ||||
| -rw-r--r-- | cpp/src/qpid/client/Connector.h | 6 |
3 files changed, 0 insertions, 56 deletions
diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp index e094e13fff..5e8596cacb 100644 --- a/cpp/src/qpid/client/ConnectionImpl.cpp +++ b/cpp/src/qpid/client/ConnectionImpl.cpp @@ -48,7 +48,6 @@ ConnectionImpl::ConnectionImpl(framing::ProtocolVersion v, const ConnectionSetti handler.onClose = boost::bind(&ConnectionImpl::closed, this, NORMAL, std::string()); connector->setInputHandler(&handler); - connector->setTimeoutHandler(this); connector->setShutdownHandler(this); //only set error handler once open diff --git a/cpp/src/qpid/client/Connector.cpp b/cpp/src/qpid/client/Connector.cpp index 793809fc7c..b6fc42a74a 100644 --- a/cpp/src/qpid/client/Connector.cpp +++ b/cpp/src/qpid/client/Connector.cpp @@ -133,55 +133,6 @@ void Connector::handleClosed() { shutdownHandler->shutdown(); } -// TODO: astitcher 20070908: This version of the code can never time out, so the idle processing -// can never be called. The timeut processing needs to be added into the underlying Dispatcher code -// -// TODO: astitcher 20070908: EOF is dealt with separately now via a callback to eof -void Connector::checkIdle(ssize_t status){ - if(timeoutHandler){ - AbsTime t = now(); - if(status == Socket::SOCKET_TIMEOUT) { - if(idleIn && (Duration(lastIn, t) > idleIn)){ - timeoutHandler->idleIn(); - } - } - else if(status == 0 || status == Socket::SOCKET_EOF) { - handleClosed(); - } - else { - lastIn = t; - } - if(idleOut && (Duration(lastOut, t) > idleOut)){ - timeoutHandler->idleOut(); - } - } -} - -void Connector::setReadTimeout(uint16_t t){ - idleIn = t * TIME_SEC;//t is in secs - if(idleIn && (!timeout || idleIn < timeout)){ - timeout = idleIn; - setSocketTimeout(); - } - -} - -void Connector::setWriteTimeout(uint16_t t){ - idleOut = t * TIME_SEC;//t is in secs - if(idleOut && (!timeout || idleOut < timeout)){ - timeout = idleOut; - setSocketTimeout(); - } -} - -void Connector::setSocketTimeout(){ - socket.setTimeout(timeout); -} - -void Connector::setTimeoutHandler(TimeoutHandler* handler){ - timeoutHandler = handler; -} - struct Connector::Buff : public AsynchIO::BufferBase { Buff(size_t size) : AsynchIO::BufferBase(new char[size], size) {} ~Buff() { delete [] bytes;} diff --git a/cpp/src/qpid/client/Connector.h b/cpp/src/qpid/client/Connector.h index c7f5be0936..cde12f7b5b 100644 --- a/cpp/src/qpid/client/Connector.h +++ b/cpp/src/qpid/client/Connector.h @@ -116,9 +116,6 @@ class Connector : public framing::OutputHandler, sys::AsynchIO* aio; boost::shared_ptr<sys::Poller> poller; - void checkIdle(ssize_t status); - void setSocketTimeout(); - void run(); void handleClosed(); bool closeInternal(); @@ -141,13 +138,10 @@ class Connector : public framing::OutputHandler, virtual void init(); virtual void close(); virtual void setInputHandler(framing::InputHandler* handler); - virtual void setTimeoutHandler(sys::TimeoutHandler* handler); virtual void setShutdownHandler(sys::ShutdownHandler* handler); virtual sys::ShutdownHandler* getShutdownHandler() { return shutdownHandler; } virtual framing::OutputHandler* getOutputHandler(); virtual void send(framing::AMQFrame& frame); - virtual void setReadTimeout(uint16_t timeout); - virtual void setWriteTimeout(uint16_t timeout); const std::string& getIdentifier() const { return identifier; } }; |
