summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp_api.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright & license header to use SPDX idAlan Antonuk2021-07-271-34/+2
| | | | | | | This makes license detection machine-readable, and makes source files more concise and easier to read and understand. Signed-off-by: GitHub <noreply@github.com>
* Support openssl engine settingHan Mai2020-06-251-2/+4
|
* Make all timeval's constantSteven Van Ingelgem2019-12-291-2/+2
| | | | Make all struct timeval parameters that can be a const, a const.
* Format code with clang-formatAlan Antonuk2017-12-051-93/+90
|
* Remove vim mode lines.formatAlan Antonuk2017-12-041-1/+0
| | | | They're hard to keep in sync with .clang-format or other tools.
* Lib: Do not set MSG_MORE on last message header if no body followsMartin Willi2017-03-231-2/+7
| | | | | | | | | | | | | Introduced with commit 2bc1f9b1b0 (lib: use MSG_MORE on Linux for basic.publish), amqp_basic_publish() sets MSG_MORE on all but the last send() syscall it triggers on the TCP socket to improve performance. However, if no message body is provided, no completing call without MSG_MORE follows, keeping the TCP packet pending. On Linux, this may introduce a message send delay, until the kernel sends out the data anyway after 200ms. This may add a significant delay if a consumer is waiting for such an empty (confirmation) message.
* Lib: add methods to set timeout of AMQP RPCsrpc-timeoutAlan Antonuk2017-03-151-0/+18
| | | | Fixes #403
* Lib: add timeout for amqp_login and friendspr383Haster2016-11-271-3/+22
| | | | | | | | | | | By default the RabbitMQ broker sets a tunable timeout of 10 seconds from socket-open to successful handshake. This introduces a similar login timeout on the client side. If the login does not complete within this timeout, amqp_login and friends will return AMQP_STATUS_TIMEOUT and the connection will be considered dead. Two new functions amqp_set_handshake_timeout and amqp_get_handshake_timeout are introduced to tune this behavior.
* Lib: check out of range args in amqp_*_close() fn.Alan Antonuk2016-04-091-2/+10
| | | | | Check for code parameter being between 0 -> UINT16_MAX in amqp_connection_close() and amqp_channel_close() functions.
* Lib: add amqp_ssl_socket_set_versions fnAlan Antonuk2015-10-221-1/+2
| | | | | Add amqp_ssl_socket_versions function which allows a user to specify the acceptable range of TLS versions they want to connect to the broker with.
* Lib: Removed unused include <assert.h>pr314Ivan Skytte Jørgensen2015-10-181-1/+0
|
* Lib: remove unused macro RPC_REPLY.Ivan Skytte Jørgensen2015-10-181-5/+0
|
* lib: use MSG_MORE on Linux for basic.publishAlan Antonuk2015-05-311-3/+7
| | | | | | | | As a performance optimization in the send path, add an AMQP_SF_MORE flag indicating that more data is intended to be sent, and that packets shouldn't be sent out on the wire unless there is a full packet's worth of data available. Use this to specify MSG_MORE to send() on Linux.
* Disable MSVC secure-RTL function warnings.Alan Antonuk2015-05-041-0/+7
| | | | | If this project was Win32 only, I'd use them, but adding lots of ifdefs to kill warnings doesn't make a whole lot of sense.
* Refactor heartbeat timeout code to be simplerAlan Antonuk2015-05-031-13/+11
| | | | | Refactor the heartbeat timeout code to hopefully simplify it and hopefully make it less hairy to deal with in the future.
* Rename amqp_timer.[ch] to amqp_time.[ch].Alan Antonuk2015-05-031-1/+1
| | | | Rename the files to better reflect the functions that they contain.
* Simplify the timer/timeout logic.Alan Antonuk2015-04-191-1/+1
| | | | | | | | | | | 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 for unsupported SASL type.Bhasker Allam2015-04-051-1/+2
| | | | | Add error codes and associated error strings when the broker does not support the desired SASL method.
* Add error strings for new AMQP_STATUS values.Alan Antonuk2015-01-061-1/+4
|
* Add amqp_basic_nack() API functionAlan Antonuk2013-08-251-0/+11
|
* Code clarity improvements in heartbeat handlingAlan Antonuk2013-06-261-1/+1
|
* Add support for heartbeats in amqp_basic_publishAlan Antonuk2013-06-251-0/+17
| | | | | Check heartbeats when doing basic.publish. Do this by doing a recv on the socket.
* Add partial support for heartbeats in wait_frameAlan Antonuk2013-06-251-1/+2
|
* FIX: incorrect bit-shift in amqp_error_string2Alan Antonuk2013-06-181-1/+1
| | | | CID 1035140
* Add amqp_simple_wait_frame_noblock() functionAlan Antonuk2013-06-141-1/+3
| | | | | | 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.
* ABI compat fix for +-ve vals in amqp_error_stringAlan Antonuk2013-06-141-0/+10
| | | | | | | | | To preserve ABI, map positive error codes into the negative error-code domain in the amqp_error_string() function. This will preserve compat with older code-bases that do amqp_error_string(-returnval) Note: the function is marked as deprecated so the user will still get a warning when compiling code that uses this function.
* Preserve API/ABI of amqp_error_string()Alan Antonuk2013-06-141-1/+6
| | | | | | Preserve API/ABI of amqp_error_string() by having it return a string allocated on the heap. Deprecate this function in favor of amqp_error_string2() which returns a statically allocated string
* Change amqp_error_string() to ret static stringsAlan Antonuk2013-06-131-21/+71
| | | | This is an API/ABI break.
* Expose public error-code interfaceAlan Antonuk2013-06-131-30/+19
| | | | | | | | | | 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.
* Add very rudimentary error code handling for SSLAlan Antonuk2013-04-171-0/+5
|
* Updating license yearAlan Antonuk2013-04-081-0/+3
|
* Formatted source code with astyle utiltyAlan Antonuk2013-04-081-40/+46
|
* Adding vim modelines to help with source formattingAlan Antonuk2013-04-051-0/+1
|
* Set default visibility to hidden & enable a couple more warningsMichael Steinert2012-05-171-9/+5
| | | | | | | | | | | | | | Enable the following GCC options: 1. -Wstrict-prototypes 2. -Wcast-align 3. -fno-common 4. -fvisibility=hidden This commit also includes some general cleanup of header files (mostly for readability). Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
* Fix compiler warnings (checked clang & gcc)Michael Steinert2012-05-171-3/+2
| | | | Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
* Add config.h header guardsMichael Steinert2012-05-171-0/+2
| | | | Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
* Intializing unintiailzed member in amqp_basic_publishAlan Antonuk2012-05-101-0/+1
| | | | See: https://github.com/rabbitmq/rabbitmq-c/issues/9
* Automated relicensing of source files MPL/GPL -> MITMarek Majkowski2012-04-121-26/+20
|
* Update copyright 2012Emile Joubert2012-02-021-1/+1
|
* Add support for parsing amqp URLs to librabbitmqDavid Wragg2011-09-211-0/+1
|
* Update copyright noticesDavid Wragg2011-03-011-19/+7
| | | | And generally bring debian/copyright up to date.
* config.h defines _GNU_SOURCE and is therefore all we need to includeDaniel Schauenberg2011-02-031-4/+2
|
* move strdup to separate file and add guardsDaniel Schauenberg2011-02-021-7/+5
|
* Extract common code from generated API functionsDavid Wragg2011-01-141-5/+0
|
* Add an amqp_basic_reject API functionDavid Wragg2011-01-141-0/+11
|
* Generate API functions corresponding to most synchronous methodsDavid Wragg2011-01-071-232/+0
| | | | | | | | | | There's a lot of boilerplate code in amqp_api.c for API functions corresponding to synchronous AMQP methods. And some of the functions that should be there are missing (e.g. basic.qos, basic.cancel). Instead, we can generate these functions from the protocol definition, plus a little information to describe where the function arguments do not reflect all of the method fields.
* Eliminate the AMQP_EMPTY_* macros from amqp.hDavid Wragg2010-10-211-1/+3
| | | | Hooray, amqp.h is now ISO C90 clean.
* Pass "-ansi -pedantic" to gcc, so it tells us when we stray from C90David Wragg2010-10-211-0/+6
| | | | | | | | And fix up the resulting warnings We don't use "-ansi -pedantic" in the tools dir, because that code relies on libpopt, and so is unlikely ever to work with the Microsoft compiler anyway.
* Microsoft C runtime doesn't have snprintfDavid Wragg2010-10-211-6/+4
| | | | | Or rather, it seems to call it _snprintf. But we can easily live without it for its uses in librabbitmq.
* Eliminate AMQP_SIMPLE_RPC and friendsDavid Wragg2010-10-211-67/+180
| | | | They contained C99-style initializers