summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp_socket.c
Commit message (Collapse)AuthorAgeFilesLines
* Lib: add timeout for amqp_login and friendspr383Haster2016-11-271-61/+101
| | | | | | | | | | | 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.
* - Modified to enable cross-compilation with mingw-w64 cross compiler.Darmawan Salihun2016-10-141-2/+2
|
* Lib: simplify empty-bytes assignment in amqp_login.ub-fixAlan Antonuk2016-08-201-2/+1
|
* Lib: remove unreachable return statementsAlan Antonuk2016-04-091-1/+0
|
* Lib: add bounds check on amqp_login inputsAlan Antonuk2016-04-091-13/+35
| | | | | Check bounds on channel_max, frame_max, and heartbeat arguments to amqp_login* functions.
* Lib: correct input type to ioctlsocket on win32Alan Antonuk2016-04-091-1/+1
|
* Lib: fix shadowed variable in wait_frame_innerAlan Antonuk2016-04-091-2/+0
|
* Lib: use for(;;) for infinite loopAlan Antonuk2016-04-091-2/+2
|
* Lib: add missing type info on win32 in socket_initAlan Antonuk2016-04-091-1/+1
|
* Lib: use amqp_cstring_bytes to construct stringAlan Antonuk2015-11-291-4/+2
| | | | | Use amqp_cstring_bytes to construct string instead of doing it manually as this is error-prone.
* Lib: clarify error check in amqp_login_innerAlan Antonuk2015-10-241-1/+1
| | | | | The current check was not clear in terms of readability, additionally it confused scan-build.
* Lib: don't try hard when closing SSL socketsAlan Antonuk2015-10-221-3/+3
| | | | | | | | If a heartbeat timeout occurs skip calling SSL_shutdown as it involves doing a send() which will likely hang. Additionally don't wait for a response when doing an SSL_shutdown, as the underlying transport will not be reused. Fixes #313
* Fix for commit ba7c342a55e200d1f72b30d74df1591b0f72de49 making assertHugo Lefebvre2015-10-211-1/+1
| | | | condition always false (forgotten parenthesis)
* Lib: remove pointless initialization of last_errorIvan Skytte Jørgensen2015-10-191-1/+1
| | | | | Don't initialize local variable last_error because it is immediately assigned to and value is not used.
* Lib: fix incorrect cast in amqp_login_inner()Ivan Skytte Jørgensen2015-10-181-1/+1
| | | | | Removed superfluous and suspicious cast in amqp_simple_rpc() call. 'replies' is already a amqp_method_number_t*
* Win32: check exceptfds in select when connectingwin32_selectAlan Antonuk2015-10-131-8/+23
| | | | | | | | | | | When doing a nonblocking connect() on win32, select() reports failure using exceptfds instead of writefds. Allow this narrow case when doing a non-blocking connect on Win32. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx Fixes #297
* If channel_max is 0, use server's channel_maxCarl Hörberg2015-07-151-1/+2
|
* Lib: add select()-based implementation of poll()Alan Antonuk2015-06-011-5/+48
| | | | | Add select() based poll() implementation for platforms that either support this better (Win32) or don't support poll().
* Lib: add AMQP_SF_POLL{IN,OUT} flags for amqp_pollAlan Antonuk2015-06-011-16/+15
| | | | | | Get rid of amqp_poll_{read,write} and flatten the call-tree to amqp_poll with an appropriate flag. Done in preparation for adding a select()-based implementation of the amqp_poll() function.
* lib: use MSG_MORE on Linux for basic.publishAlan Antonuk2015-05-311-11/+15
| | | | | | | | 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.
* amqp_socket: fix C89 compatibilityMaciek Borzecki2015-05-181-1/+2
| | | | | If building with a compiler that does not support C99, this would raise a warning.
* amqp_socket: res may be returned uninitializedMaciek Borzecki2015-05-141-1/+0
| | | | | | Remove scope local res variable that shadows the function local variable defined in amqp_socket.c:1118. This removes a possible branch point that triggered a return of uninitialized value.
* Handle connection.close on auth failure.Alan Antonuk2015-05-061-14/+34
|
* Add amqp_get_client_properties functionAlan Antonuk2015-05-061-2/+3
|
* Add auth failure client capability as default.Alan Antonuk2015-05-061-1/+10
|
* Add cababilities merge function.Alan Antonuk2015-05-061-54/+62
| | | | Add amqp_merge_capabilities function that merges client-properties tables.
* Add convenience funcs for creating table entries.Alan Antonuk2015-05-051-30/+15
|
* Don't redefine EINPROGRESS EWOULDBLOCK on Win32.Alan Antonuk2015-05-041-1/+4
| | | | | These constants are already defined in the Win32, and they're being incorrectly redefined by rabbitmq-c.
* Disable MSVC secure-RTL function warnings.Alan Antonuk2015-05-041-0/+4
| | | | | 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.
* Fix int truncation warnings on Win32Alan Antonuk2015-05-041-10/+19
|
* Check for heartbeats when in blocking send.timer_refactorAlan Antonuk2015-05-031-2/+10
| | | | | | | 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.
* Remove writev specific code.Alan Antonuk2015-05-031-50/+0
|
* Fixup of commentAlan Antonuk2015-05-031-1/+1
|
* Extract poll selection from send/writevAlan Antonuk2015-05-031-30/+19
|
* Extract deadline as param of try_writev/try_sendAlan Antonuk2015-05-031-16/+3
|
* Refactor heartbeat timeout code to be simplerAlan Antonuk2015-05-031-78/+23
| | | | | 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.Alan Antonuk2015-05-031-27/+27
| | | | | Rename amqp_timer_t related functions to improve readability of the code and clarify what they do.
* 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.
* Correct buffer recalc error in amqp_try_sendAlan Antonuk2015-04-301-1/+1
| | | | | 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.
* Simplify the timer/timeout logic.Alan Antonuk2015-04-191-125/+61
| | | | | | | | | | | 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
* Refactor read/write poll function usage.Alan Antonuk2015-04-191-88/+72
|
* Add support for send/writev in non-blocking modeAlan Antonuk2015-04-191-5/+157
|
* Add support for non-blocking read in rabbitmq-cAlan Antonuk2015-04-191-58/+60
|
* Leave socket as non-blocking after connectAlan Antonuk2015-04-191-12/+0
|
* Simplify amqp_open_socket_nonblock.Alan Antonuk2015-04-191-80/+65
|
* fix WSAEINVAL WSAPoll due to POLERR in eventsIvan Efimov2015-04-081-1/+1
|
* Unit test for verify sasl mechanismsBhasker Allam2015-04-051-2/+2
|
* Add error codes for unsupported SASL type.Bhasker Allam2015-04-051-0/+1
| | | | | Add error codes and associated error strings when the broker does not support the desired SASL method.
* Add EXTERNAL SASL mechanism.Alan Antonuk2015-04-051-0/+67
|
* Update copyright on files changed in 2014.Alan Antonuk2014-08-261-1/+1
|