summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionHandler.h
Commit message (Collapse)AuthorAgeFilesLines
* SASLizing Interbroker LinksMichael Goulish2010-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------- 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-2631: For blocking Bounds::expand() calls, only increase the current ↵Gordon Sim2010-05-271-3/+6
| | | | | | 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-2/+7
| | | | | | | | | | | | 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/+3
| | | | | | 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/+2
| | | | | | use for a connection git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@817770 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793909 13f79535-47bb-0310-9956-ffa450edef68
* Implement heartbeat timeout on client:Andrew Stitcher2009-01-131-1/+4
| | | | | | | | - 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-0/+1
| | | | | | | | - 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-0/+7
| | | | | | | | * 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
* Restrict connection close codes to the set defined in the specGordon Sim2008-11-061-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711989 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1340 froM Mick Goulish: preliminary client-side failover support.Alan Conway2008-10-101-0/+3
| | | | 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-0/+1
| | | | | | | | | 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/+1
| | | | 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/+4
| | | | | | ConnectionHandler git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@679268 13f79535-47bb-0310-9956-ffa450edef68
* QPID-974: allow the size of the queue of outgoing frames to be restrictedGordon Sim2008-04-291-23/+12
| | | | | | | | 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-3/+3
| | | | 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-1/+3
| | | | | | | | | | * 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-11/+40
| | | | | | | | | | * 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
* * src/qpid/broker/Session.h, .cpp: Session holds all state of a session ↵Alan Conway2007-08-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | including handlers created for that session. Session is not directly associated with a channel. * src/qpid/broker/SessionAdapter.h, .cpp: SessionAdapter is bound to a channel managed by the Connection. It can be attached to and detatched from a Session. * src/qpid/broker/Connection.cpp, .h: Use SessionAdapter. * src/qpid/framing/Handler.h: Removed use of shared_ptr. Handlers belong either to a Session or a Connection and are destroyed with it. * src/qpid/framing/InputHandler.h, OutputHandler.h: Both now inherit from FrameHandler and can be used as FrameHandlers. Intermediate step to removing them entirely. * src/qpid/broker/ConnectionAdapter.h: * src/qpid/client/ConnectionHandler.h: * src/qpid/framing/ChannelAdapter.cpp, .h: Minor changes required by Handler changes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570982 13f79535-47bb-0310-9956-ffa450edef68
* AMQBodies are no longer allocated on the heap and passed with shared_ptr.Alan Conway2007-08-161-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Added first cut of generated client interface.Gordon Sim2007-08-051-0/+2
| | | | | | | | | 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/+80
* 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