summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionImpl.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix read-credit bug causing cluster brokers to disconnect clients sporadically.Alan Conway2010-07-141-1/+3
| | | | | | | Also added connection identifier in connection log messages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@964213 13f79535-47bb-0310-9956-ffa450edef68
* An alternative attempt at ensuring ConnectionImpl is not deleted before IO ↵Gordon Sim2010-04-171-8/+7
| | | | | | thread is finished with it. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@935275 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2511: Altered shutdown sequence in connectors; after connect() has ↵Gordon Sim2010-04-151-2/+6
| | | | | | returned there will always now be a shutdown callback made and only at that point is it guaranteed that there will be no further io callbacks. ConnectionImpl consequently waits for this before allowing itself to be deleted. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@934503 13f79535-47bb-0310-9956-ffa450edef68
* Improved fix for to create client library Poller. Improved because itAndrew Stitcher2010-04-081-1/+3
| | | | | | is now created at first need rather than library load. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931781 13f79535-47bb-0310-9956-ffa450edef68
* Separate FailoverListener from client::Connection.Alan Conway2009-10-261-4/+1
| | | | | | | | | | | | | | | | | | client::ConnectionImpl used to contain a FailoverListener to subscribe for updates on the amq.failover exchange. This caused some lifecycle issues including memory leaks. Now FailoverListener is a public API class that the user must create associated with a session to get known-broker updates. Removed the weak_ptr logic in client::SessionImpl which was only required because of FailoverListener. Made SessionImpl::close() idempotent. Gets rid of spurious warning messages in some tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@829931 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793909 13f79535-47bb-0310-9956-ffa450edef68
* Fix issue with python clients to cluster, mis handling of channel 0.Alan Conway2009-05-041-2/+4
| | | | | | | | cpp/src/qpid/client/ConnectionImpl.cpp: allow 0 as a valid channel identifier. python/qpid/connection.py: don't use 0 as a channel identifier. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@771452 13f79535-47bb-0310-9956-ffa450edef68
* Implement heartbeat timeout on client:Andrew Stitcher2009-01-131-0/+2
| | | | | | | | - The client shuts down a connection if it receives no traffic on it in 2 timeout periods git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@734221 13f79535-47bb-0310-9956-ffa450edef68
* Resolve inconsistent refs to ConnectionSettings; resolves QPID-1369Stephen D. Huston2008-10-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@705369 13f79535-47bb-0310-9956-ffa450edef68
* Fix race in cluster causing incorrect known-broker lists to be sent to clients.Alan Conway2008-10-161-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@705287 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1340 froM Mick Goulish: preliminary client-side failover support.Alan Conway2008-10-101-3/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@703319 13f79535-47bb-0310-9956-ffa450edef68
* Client-side support for amq.faiover exchange. Connection::getKnownBrokers ↵Alan Conway2008-10-091-2/+11
| | | | | | provides latest list. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@703237 13f79535-47bb-0310-9956-ffa450edef68
* Refactored c++ client library to allow multiple protocols to beAndrew Stitcher2008-09-111-1/+1
| | | | | | | | | | | | | | | used simultaneously: - Added in capability for client library plugins: Client library will load in plugin modules from the client library module directory on library load. - Add protocol option into the standard client command line options - Split plugin module load area into daemon and client; default daemon module directory is now <libdir>/qpid/daemon, default client module directory is <libdir>/qpid/client. - Changed names of plugins to leave out libqpid prefix git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@694113 13f79535-47bb-0310-9956-ffa450edef68
* Refactor to change client connector state machine to be held in ↵Andrew Stitcher2008-07-241-3/+0
| | | | | | ConnectionHandler git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@679268 13f79535-47bb-0310-9956-ffa450edef68
* Some small changes which clean up header file inclusionsAndrew Stitcher2008-07-091-2/+3
| | | | | | | | and generally start to tidy up the network layer so that it's a bit easier to implement new network transports git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@675338 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1137: don't treat connection as opened if the open never succeedsGordon Sim2008-06-261-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@671877 13f79535-47bb-0310-9956-ffa450edef68
* Added exceptions to sys::Waitable.Alan Conway2008-06-061-3/+1
| | | | | | | | Fixed client side deadlock involving client::Bounds. Fixed incorrect exception messages during connection shutdown. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@664114 13f79535-47bb-0310-9956-ffa450edef68
* Fixed intermittent leak of client::Connector thread.Alan Conway2008-05-261-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@660320 13f79535-47bb-0310-9956-ffa450edef68
* qpid::SessionState: Added error checking for invalid frame sequences.Alan Conway2008-05-231-3/+5
| | | | | | | client: Fix client crash on error during connection shutdown. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@659538 13f79535-47bb-0310-9956-ffa450edef68
* QPID-974: allow the size of the queue of outgoing frames to be restrictedGordon Sim2008-04-291-15/+16
| | | | | | | | QPID-544: tidy up configuration (ensuring desired settings are used correctly, allowing tcp socket options to be set etc) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@652083 13f79535-47bb-0310-9956-ffa450edef68
* QPID-920: converted c++ client to use final 0-10 protocolGordon Sim2008-04-201-4/+4
| | | | | | | | | | * connection handler converted to using invoker & proxy and updated to final method defs * SessionCore & ExecutionHandler replace by SessionImpl * simplified handling of completion & results, removed handling of responses git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@649915 13f79535-47bb-0310-9956-ffa450edef68
* Improved/additional client API tests.Alan Conway2008-01-241-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced InProcessBroker with a more accurate loopback BrokerFixture. - Added asserts for mutex/condition/thread errors in debug build. - Added client tests for several exception conditions. - Added peer address to log ouput, client/server distinguished by (addr) or [addr] - Fixed various deadlocks & races exposed by the new asserts & tests. File-by-file: New BrokerFixture replaces InProcessBroker D src/tests/InProcessBroker.h M src/tests/BrokerFixture.h M src/tests/SocketProxy.h M src/tests/Makefile.am Made it run a bit faster. M src/tests/quick_perftest Redundant D src/tests/APRBaseTest.cpp Updated tests to use BrokerFixture M src/tests/ClientChannelTest.cpp M src/tests/exception_test.cpp M src/tests/ClientSessionTest.cpp Print thread IDs in decimal, same as GDB. M src/qpid/log/Logger.cpp Assert mutex/condition ops in debug build. M src/qpid/sys/posix/check.h M src/qpid/sys/posix/Mutex.h M src/qpid/sys/posix/Condition.h M src/qpid/sys/posix/Thread.h Added toFd() so SocketProxy can use ::select() M src/qpid/sys/Socket.h M src/qpid/sys/posix/Socket.cpp Fixes for races & deadlocks shown up by new tests & asserts. Mostly shutdown/close issues. M src/qpid/client/ConnectionHandler.h M src/qpid/client/ConnectionImpl.cpp M src/qpid/client/Demux.h M src/qpid/client/SessionCore.cpp M src/qpid/client/ConnectionHandler.cpp M src/qpid/client/Connector.h M src/qpid/client/Demux.cpp M src/qpid/client/Dispatcher.cpp M src/qpid/client/ConnectionImpl.h Logging peer address. M src/qpid/sys/AsynchIOAcceptor.cpp git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@615063 13f79535-47bb-0310-9956-ffa450edef68
* Fixed deadlock on connection closeGordon Sim2007-12-121-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@603551 13f79535-47bb-0310-9956-ffa450edef68
* Summary:Alan Conway2007-12-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced InProcessBroker with BrokerFixture, uses a full loopback broker for more realistic tests. - Extracted non-generated parts of Session_0_10 into SessionBase. - Sundry small fixes. src/tests/BrokerFixture.h - in process broker with loopback connections. - tests can force a disorderly disconnect. src/qpid/client/Connector.h - back door to private members for BrokerFixture. - close() in destructor to avoid leaks. src/qpid/client/ConnectionImpl.h,cpp: - close() in destructor, to fix hang when destroyed without being closed. src/qpid/client/CompletionTracker.h,.cpp: - Fixed race in close/add. src/qpid/client/SessionBase.h,cpp: - Extracted all non-generated code from Session_0_10 into SessionBase - Added sync() src/tests/exception_test.cpp: Converted to boost & BrokerFixture src/tests/ClientChannelTest.cpp, ClientSessionTest.cpp: Use BrokerFixture git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@602182 13f79535-47bb-0310-9956-ffa450edef68
* Session resume support in client & broker: Client can resume a sessionAlan Conway2007-10-261-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | after voluntary suspend() or network failure. Frames lost in network failure are automatically re-transmitted for transparent re-connection. client::Session improvements: - Locking to avoid races between network & user threads. - Replaced client::StateManager with sys::StateMonitor - avoid heap allocation. qpid::Exception clean up: - use QPID_MSG consistently to format exception messages. - throw typed exceptions (in reply_exceptions.h) for AMQP exceptions. - re-throw correct typed exception on client for exceptions from broker. - Removed QpidError.h rubygen/templates/constants.rb: - constants.h: Added FOO_CLASS_ID and FOO_BAR_METHOD_ID constants. - reply_constants.h: Added throwReplyException(code, text) log::Logger: - Fixed shutdown race in Statement::~Initializer() git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@588761 13f79535-47bb-0310-9956-ffa450edef68
* Ensure no danbling pointers in client API:Alan Conway2007-09-281-1/+2
| | | | | | | | | - Session -shared_ptr-> SessionCore -shared_ptr-> ConnectionImpl - Connection -shared_ptr-> ConnectionImpl - ConnectionImpl -weak_ptr-> SessionCore git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@580440 13f79535-47bb-0310-9956-ffa450edef68
* * src/tests/ClientSessionTest.cpp: Suspend/resume tests.Alan Conway2007-09-281-8/+7
| | | | | | | | | | | | | | | * broker/SessionManager.cpp, broker/SessionHandler.cpp: Implement suspend/resume * client/ScopedAssociation.h, SessionCore.h, SessionHandler.h: Simplified relationships. - Removed ScopedAssociation. - SessionHandler: is now a member of SessionCore. - SessionCore: shared_ptr ownership by Session(s) and ConnectionImpl. - Using framing::FrameHandler interfaces. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@580403 13f79535-47bb-0310-9956-ffa450edef68
* Detect that connection is already closed on attempt to close()Gordon Sim2007-09-261-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@579582 13f79535-47bb-0310-9956-ffa450edef68
* Client side support for message and delivery properties in header segments.Gordon Sim2007-09-101-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@574176 13f79535-47bb-0310-9956-ffa450edef68
* Fixed race in connection shutdown preventing Connector from being garbage ↵Gordon Sim2007-08-061-1/+1
| | | | | | collected on occasion. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@563067 13f79535-47bb-0310-9956-ffa450edef68
* Added first cut of generated client interface.Gordon Sim2007-08-051-0/+71
Old channel interface still supported; shares SessionCore with the new interface. Todo: allow applications to signal completion of received commands; keywrod args for interface. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@562866 13f79535-47bb-0310-9956-ffa450edef68