| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Check for recv heartbeats when blocking on sending to the socket. A blocked send
can indicate that the broker is applying backpressure to publishers, it could
also be that the TCP connection is dead, checking for recv heartbeats can give
an earlier indication that the connection is broken.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Refactor the heartbeat timeout code to hopefully simplify it and hopefully make
it less hairy to deal with in the future.
|
|
|
|
|
| |
Rename amqp_timer_t related functions to improve readability of the code and
clarify what they do.
|
|
|
|
| |
Rename the files to better reflect the functions that they contain.
|
|
|
|
|
| |
This one only shows up when send() does a partial read, which is why it wasn't
caught immediately. Need some better tests for this.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of passing around a start time and timeout interval, calculate this
early and pass around the timeout value (as a implementation detail), then
calculate against current timestamp. This simplifies the code, gives a more
realistic 'timeout' for the function at the cost of potentially a few more timer
pings.
Conflicts:
librabbitmq/amqp_socket.c
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Add error codes and associated error strings when the broker does not support
the desired SASL method.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Add 'platform' 'version', 'copyright' client-properties to start-ok method
during connection handshake.
Adapted from:
https://github.com/synety-jdebp/rabbitmq-c/commit/e3c76e1887ff50378f6146167daa024dbd7d4eeb
by: Jonathan de Boyne Pollard <jonathan.de.boyne.pollard@synety.com>
|
|
|
|
|
| |
sockfd is assigned, then assigned again unconditionally without being read
from. There's no point in this statement, so lets get rid of it.
|
|
|
|
|
|
|
|
| |
Improve detection of invalid AMQP frame header before allocating frame buffer.
This fixes #187.
Thanks to Mike Stitt <mikes@spindance.com> for the inspiration on this.
|
|
|
| |
milliseconds = seconds * 1000 + microseconds / 1000
|
|
|
|
|
|
|
| |
Use poll(2) instead of select(2) to do timeout operations on sockets. This helps
with the situation where the fd is larger than FD_MAXSIZE.
Fixes #168
|
| |
|
|
|
|
|
| |
Add function to return the properties table advertised by the broker on
connection to the broker.
|
|
|
|
|
| |
This fixes a regression introduced in 6ad770dc where the
amqp_open_socket() function is no longer defined.
|
|
|
|
|
|
|
|
| |
Probably introduced when consume_one_frame() function was added, and
wasn't found during testing because its rare to see partial recv of
frame when testing locally. Need to devise a test for this.
Fixes #126
|
| |
|
|
|
|
|
| |
Some platforms declare tv.tv_sec and tv.tv_usec as long which is 32-bit
which will integer overflow in our date math
|
| |
|
|
|
|
|
| |
Get rid of experimental amqp_socket_error interface. Errors are returned
using the error codes from the primary function
|
|
|
|
|
|
|
|
| |
Improve the socket interface by making the amqp_connection_state_t
object the amqp_socket_t owner, and tie its lifetime to the connection's
lifetime. This prevents a class of silly errors where the socket object
isn't freed, or the socket object is assigned to two different
connection objects
|
| |
|
|
|
|
|
| |
Check heartbeats when doing basic.publish. Do this by doing a recv on
the socket.
|
| |
|
|
|
|
|
| |
The DISABLE_SIGPIPE_WITH_SETSOCKOPT preprocessor define got deleted the
os-layer socket functions were moved to amqp_socket.c. This fixes that.
|
|
|
|
|
|
| |
Assign a decoding pool on a per-channel basis. This allows memory to be
released on a per-channel basis which is helpful for clients handling
multiple channels
|
|
|
|
|
| |
CID 1035138
CID 1035137
|
|
|
|
|
|
| |
Add non-blocking variant of amqp_simple_wait_frame() to assist clients
in writing programs that want non-blocking behavior when consuming
messages from the broker.
|
| |
|
|
|
|
|
| |
amqp_socket_close has the side-effect of destroying the socket object.
Use after this will cause undefined behavior
|
|
|
|
|
| |
Doing this for code clarity, as its easier to see what the issues are
when you have all implementations in one file
|
| |
|
|
|
|
|
|
|
| |
amqp_simple_wait_method() should not call abort(), instead close the
underlying socket, then return AMQP_STATUS_WRONG_METHOD. This is still
rather heavy-handed for a public API, however, its a lot better than
killing the entire application
|
|
|
|
|
|
|
|
|
|
| |
Publicly define the error codes returned from the various public API
functions. The error codes are defined in the amqp_status_enum and are
all negative in value to work with functions that return positive
values.
OS and SSL specific codes are no longer munged into the error code, as
it is unlikely for that information to be useful to library users.
|
|
|
|
|
| |
Be sure to va_end any va_start'ed va_lists in amqp_login and
amqp_login_with_properties
|
|
|
|
|
|
| |
Properly munge the error code from amqp_socket_init on Win32, previously
it was not munged correctly and an error code could be mistaken as a
sockfd
|
| |
|