Commit Graph

13 Commits

Author SHA1 Message Date
Sergey Platonov 175482412f Method reset() added to a QAmqpChannel class
Sometimes user needs to reset the channel state, for example in case of
attempt to declare an exisiting queue.
2016-12-12 08:52:27 -05:00
Matt Broadstone 7d9f80331e fix(QAmqpChannel): needOpen was false if channel was defined
fixes #42
2016-03-28 12:27:35 -04:00
Matt Broadstone f6c43d9196 refactor(debug): vastly improve debug messages for framing 2016-03-04 12:53:02 -05:00
Matt Broadstone f6777e66df refactor(channels): move resetInternalState to private impls 2015-11-20 08:07:21 -05:00
Matt Broadstone 0c96cfca52 refactor(QAmqpChannel): reset channel state on disconnect
We now track channels in QAmqpChannelHash for use across reconnects
however, the internal state of these channels was not being reset
when the connection was reestablished. This provides a way to do
that for not only channels, but both of its subclasses
2015-11-19 17:43:31 -05:00
Stuart Longland 2b707d53de QAmqpChannel: Emit closed signal when server closes.
When we initiate a Close, we get a CloseOk in response and on receipt of
the CloseOk, we mark the channel as closed and emit a signal to notify
everyone else.

Great.  Now what happens when the server closes the channel?  We emit a
CloseOk, then… nothing.  We do nothing.  This fixes this problem, moving
the notification/marking logic to a new function and calling that on
both Close (sent from server) and CloseOk.
2015-05-02 20:41:19 +10:00
Marcelo E. Magallon 2652206d18 Increment nextChannelNumber only once
nextChannelNumber is being incremented twice. When the counter wraps
around it starts declaring already existing channels and the AMQP server
disconnects the client. This patch doubles the number of channels that
can be created before this happens.
2015-02-11 16:13:27 -06:00
Marcelo E. Magallon 79226ccb35 Change channel id type to quint16
My reading of the spec is that channel numbers are unsigned.
2015-02-11 16:12:36 -06:00
Matt Broadstone 4640a9ad6a cleanup frame handlers on channel deletion
In cases where exchanges and queues are added and deleted during
an extended use of a QAmqpClient, the client should internally cleanup
the frame handlers registered for those objects. This patch does that
as well as providing two test cases verifying this behavior for both
QAmqpQueue and QAmqpExchange.
2015-02-06 16:12:58 -05:00
Matt Broadstone 009c3131f5 add two new properties, changed the name of one
QAmqpQueue and QAmqpExchange both now have an isDeclared property,
and QAmqpChannel::isOpened was renamed to isOpen to more closely follow
Qt style/api guidelines
2015-01-31 12:44:25 -05:00
Matt Broadstone 7242a64a2f clean up QAmqpFrame paths
- opt for QDataStream overloads instead of read ctor and toStream methods
- removed some unneccesary prefixes to Type and MethodClass enums
- removed documentation from header (this is coming back!)
- cleaned up some confusing code paths, removed unneccessary methods (like readHeader/writeHeader)
2014-09-15 15:45:20 -04:00
Matt Broadstone 10ab1423c2 remove QAMQP namespace
This is a very small library, so there is no real pressing need for
a library namespace. Further, the namespacing actually makes it rather
difficult to work with in some cases. Opting for a more "Qt" style
class naming scheme, using the QAmqp class prefix
2014-09-15 13:26:48 -04:00
Matt Broadstone 6a3d355de2 rename amqp_ files to qamqp
amqp_<filename> is used in at least two other C/C++ projects related
to amqp, so this commit changes all our source to use a qamqp header.
This avoids potential clashes, and is more in line with Qt style
2014-08-26 15:05:39 -04:00