summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionHandler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update from trunk r1375509 through r1450773asyncstoreKim van der Riet2013-02-281-3/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1451244 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3858: Updated branch - merged from trunk r.1368650Kim van der Riet2012-08-031-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1368910 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3858: Updated branch - merged from trunk r.1333987Kim van der Riet2012-05-041-3/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1334037 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3522: Distinguish between null and empty string for sasl responseGordon Sim2011-10-121-2/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1182212 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3382: Corrected some exception types for connect errorsGordon Sim2011-08-011-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1152853 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3115: Recognise sasl_mechanisms (plural) and support a space separate ↵Gordon Sim2011-03-071-15/+33
| | | | | | list as does the python client (continue to recognise sasl-mechanism as well for backword compatibility) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1078733 13f79535-47bb-0310-9956-ffa450edef68
* SASLizing Interbroker LinksMichael Goulish2010-10-201-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------- 1. Brokers already knew how to handle the server side of SASLized links, but not the client side. So we promoted the client-side SASL code from the client library to the common library so that the broker could also use it. This affected SaslFactory.{h,cpp} and Sasl.h TODO -- can the server-side and client-side code be unified here? 2. Some of the SASL verbs in broker/ConnectionHandler.cpp are expanded: start, secure, tune. 3. broker/SecureConnection is altered to get the client-broker and the server-broker to agree on when the security layer should be inserted. 4. the python tool qpid-route is modified so that, in the "route add" command, you can specify the security mechanism for SASL to use. TODO -- should we also pass in {min,max}SSF ? 5. Changes in broker/LinkRegistry to allow the information input by qpid-route to be passed up to where it is needed. 6. A bash script test run by "make check" that creates a SASLized federation link and sends some messages down it. TODO - write a python unit test instead of a bash script. I think I uncovered a bug in the python code when I tried. 7. NOTE - testing for this feature does not work with versions of SASL earlier than 2.1.22, becuase I can't tell SASL to use a SASL database file in a nonstandard location. The test is disabled for earlier versions. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1024541 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2817: on close, wait for at most the heartbeat interval (if specified) ↵Gordon Sim2010-08-201-1/+8
| | | | | | for close-ok response from broker git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@987429 13f79535-47bb-0310-9956-ffa450edef68
* Fix compilation error on windowsGordon Sim2010-05-281-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@949182 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2631: For blocking Bounds::expand() calls, only increase the current ↵Gordon Sim2010-05-271-2/+10
| | | | | | count when there is space. In SessionImpl::send() expand bounds before queueing frame. Expand bounds for all frames sent (including connection frames and cluster specific frames). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@948936 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2412: Support for EXTERNAL mechanism on client-authenticated SSL ↵Gordon Sim2010-03-051-1/+1
| | | | | | | | | | | | connections. On SSL connection where the clients certificate is authenticated (requires the --ssl-require-client-authentication option at present), the clients identity will be taken from that certificate (it will be the CN with any DCs present appended as the domain, e.g. CN=bob,DC=acme,DC=com would result in an identity of bob@acme.com). This will enable the EXTERNAL mechanism when cyrus sasl is in use. The client can still negotiate their desired mechanism. There is a new option on the ssl module (--ssl-sasl-no-dict) that allows the options on ssl connections to be restricted to those that are not vulnerable to dictionary attacks (EXTERNAL being the primary example). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@919487 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1899: Applied patch from Ken Giusti to tie in SASL enctryption to the ↵Gordon Sim2009-11-091-1/+2
| | | | | | handling of the --require-encrypted option git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834108 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2112 - C++ Client: Facility needed for app to extract the user-ID in ↵Ted Ross2009-09-221-0/+1
| | | | | | use for a connection git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@817770 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2048: Handle connection fail while attempting to close.Gordon Sim2009-08-131-4/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@803802 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
* - Added heartbeat generation to the client (actually echo back anyAndrew Stitcher2009-06-081-8/+12
| | | | | | | | | broker generated heartbeat) - Broker now disconnects client if it receives no traffic in 2 heartbeat intervals (which is now the same as the client behvaiour) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@782651 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1676 - Added client process name and pid to connection object for ↵Ted Ross2009-02-241-0/+7
| | | | | | | | | | management. Supported in C++, Python, and Ruby clients. Still needs to be added to the Java clients. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@747389 13f79535-47bb-0310-9956-ffa450edef68
* Send client property indicating that client supportsAndrew Stitcher2009-02-021-0/+4
| | | | | | | | | producer throttling in the Connection.OpenOK message. Broker only tries to apply flow control to client if it has received the property in the Connection.OpenOK message. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740135 13f79535-47bb-0310-9956-ffa450edef68
* Implement heartbeat timeout on client:Andrew Stitcher2009-01-131-14/+29
| | | | | | | | - 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
* Send heartbeat from broker to clientAndrew Stitcher2009-01-131-2/+15
| | | | | | | | - Server sends possible heartbeat range and client replies with desired heartbeat as part of the tune-tuneOk exchange git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@734220 13f79535-47bb-0310-9956-ffa450edef68
* * Cyrus SASL intgeration for c++ clientGordon Sim2009-01-061-7/+49
| | | | | | | | * SASL security layer support for c++ client and broker git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@732082 13f79535-47bb-0310-9956-ffa450edef68
* Don't stop connector until close has been sent and close-ok received in ↵Gordon Sim2008-11-131-2/+5
| | | | | | response. (If necessary delay error notification until then). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@713739 13f79535-47bb-0310-9956-ffa450edef68
* Restrict connection close codes to the set defined in the specGordon Sim2008-11-061-3/+17
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711989 13f79535-47bb-0310-9956-ffa450edef68
* Various fixes arising from testing client failover:Gordon Sim2008-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | * introduced new exception type for signalling connection failure (as distinct from any logical connection errors) * ConnectionImpl::closeInternal(): take copy of session map to prevent concurrent modification (by the same thread) as sessions are deleted and erase themselves. * ConnectionImpl::shutdown: hold lock before calling closeInternal(); mark handler failed before informing sessions of failure * SessionImpl::connectionBroker(): remove code as its rather meaningless * Don't swallow exceptions in Dispatcher * Handle exceptions in FailoverListener * Take weak_ptr to ConnectionImpl on constructor of Connector, then convert to shared_ptr when 'receiver' thread is started. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@710106 13f79535-47bb-0310-9956-ffa450edef68
* Fix minor compile warnings noticed on WindowsStephen D. Huston2008-10-271-3/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@708387 13f79535-47bb-0310-9956-ffa450edef68
* Minor cleanup for client failover.Alan Conway2008-10-141-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@704637 13f79535-47bb-0310-9956-ffa450edef68
* Client-side INFO logging for known-broker updates.Alan Conway2008-10-101-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@703519 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1340 froM Mick Goulish: preliminary client-side failover support.Alan Conway2008-10-101-2/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@703319 13f79535-47bb-0310-9956-ffa450edef68
* Cluster join & brain-dumps working.Alan Conway2008-10-031-1/+3
| | | | | | | | | cluster: improved join protocol, fixed race conditions. client/ConnectionHandler,ConnectionImpl: fixed connection close race causing client hang. src/qpid/sys/PollableQueue.h: fixed incorrect use of startWatch/stopWatch. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@701532 13f79535-47bb-0310-9956-ffa450edef68
* Cluster replicates session command sequence state and consumers to newcomers.Alan Conway2008-09-241-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@698666 13f79535-47bb-0310-9956-ffa450edef68
* Refactor to change client connector state machine to be held in ↵Andrew Stitcher2008-07-241-0/+11
| | | | | | ConnectionHandler git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@679268 13f79535-47bb-0310-9956-ffa450edef68
* Added exceptions to sys::Waitable.Alan Conway2008-06-061-4/+3
| | | | | | | | 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
* Fix error handling for connection close during startup.Gordon Sim2008-05-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@653248 13f79535-47bb-0310-9956-ffa450edef68
* QPID-974: allow the size of the queue of outgoing frames to be restrictedGordon Sim2008-04-291-16/+11
| | | | | | | | 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
* Generate c++ code from final 0-10 specGordon Sim2008-04-241-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@651423 13f79535-47bb-0310-9956-ffa450edef68
* QPID-648: (based on patch from mfarrellee@redhat.com) Gordon Sim2008-04-221-4/+9
| | | | | | | | | | * apply authentication to final 0-10 codepath * consolidate conditional compilation of sasl-related code * improved handling of connection close during connection establishment in client git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@650439 13f79535-47bb-0310-9956-ffa450edef68
* QPID-920: converted c++ client to use final 0-10 protocolGordon Sim2008-04-201-101/+80
| | | | | | | | | | * 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Fixes to max frame size default and fragmentation on broker.Gordon Sim2007-12-181-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@605251 13f79535-47bb-0310-9956-ffa450edef68
* Add log message when broker closes connectionGordon Sim2007-12-171-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@604947 13f79535-47bb-0310-9956-ffa450edef68
* Fixed client crash on error opening a connection.Alan Conway2007-12-111-5/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@603411 13f79535-47bb-0310-9956-ffa450edef68
* Added framing::BodyHolder:Alan Conway2007-11-221-1/+1
| | | | | | | | | | | | | | - Uniform holder for all body types, replaces MethodHolder. - Uses in_place constructors to avoid avoid body copy. framing::AMQFrame: - Holds body in heap-allocated intrusive_ptr<BodyHolder> - Uses in_place constructors to avoid avoid body copy. Removed/downgraded to TODO many redundant FIXME comments. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@597513 13f79535-47bb-0310-9956-ffa450edef68
* Session resume support in client & broker: Client can resume a sessionAlan Conway2007-10-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Detect that connection is already closed on attempt to close()Gordon Sim2007-09-261-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@579582 13f79535-47bb-0310-9956-ffa450edef68
* Updated message.transfer encoding to use header and content segments ↵Gordon Sim2007-08-281-1/+1
| | | | | | | | | | (including new structs). Unified more between the basic and message classes messages. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570538 13f79535-47bb-0310-9956-ffa450edef68
* AMQBodies are no longer allocated on the heap and passed with shared_ptr.Alan Conway2007-08-161-33/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | AMQFrame contains a boost::variant of AMQHeaderBody,AMQContentBody, AMQHeatbeatBody, and MethodHolder. A variant is basically a type-safe union, it can allocate any of the types in-place. MethodHolder contains a Blob, a less sophisticated kind of variant, which can contain any of the concrete method body types. Using variants for all the method types causes outrageous compile times and bloated library symbol names. Blob lacks some of the finer features of variant and needs help from generated code. For now both are hidden to the rest of the code base behind AMQFrame and MethodBody classes so if/when we decide to settle on just one "variant" type solution we can do so. This commit touches nearly 100 files, mostly converting method signatures with shared_ptr<FooBody> to FooBody* or FooBody&, and converting stored shared_ptr<AMQBody> to AMQFrame and share_ptr<AMQMethodBody> to MethodHolder. There is one outstanding client memory leak, which I will fix in my next commit. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566822 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-2/+3
| | | | | | | | | 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
* Some restructuring of the client code: Gordon Sim2007-08-021-0/+196
* Introduced three separate 'handlers' for the connection, channel and execution 'layers'. * Support for asynchronous retrieval of response or completion status. * Channel methods no longer included in execution layers command id count. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@562212 13f79535-47bb-0310-9956-ffa450edef68