summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp_tcp_socket.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright & license header to use SPDX idAlan Antonuk2021-07-271-21/+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>
* Move official includes to rabbitmq-c/ directoryAlan Antonuk2021-04-051-1/+1
| | | | | | | | | | | | | | | Move official rabbitmq-c includes under the rabbitmq-c, thus new programs should use the following include paths: amqp.h -> rabbitmq-c/amqp.h amqp_tcp_socket.h -> rabbitmq-c/tcp_socket.h amqp_ssl_socket .h-> rabbitmq-c/ssl_socket.h amqp_framing.h -> rabbitmq-c/framing.h Existing include files are left with a warning message and including their new equivalents, so existing programs should compile without modification. Signed-off-by: GitHub <noreply@github.com>
* Make all timeval's constantSteven Van Ingelgem2019-12-291-1/+1
| | | | Make all struct timeval parameters that can be a const, a const.
* Format code with clang-formatAlan Antonuk2017-12-051-48/+36
|
* Remove vim mode lines.formatAlan Antonuk2017-12-041-1/+0
| | | | They're hard to keep in sync with .clang-format or other tools.
* - Modified to enable cross-compilation with mingw-w64 cross compiler.Darmawan Salihun2016-10-141-2/+2
|
* Lib: don't use TCP_NOPUSH under cygwincygwin_nopushAlan Antonuk2016-01-121-1/+3
| | | | | | | Cygwin defines TCP_NOPUSH, but fails with an error when you try to use it. Disable it on Cygwin. Fixes #335
* Lib: don't try hard when closing SSL socketsAlan Antonuk2015-10-221-2/+2
| | | | | | | | 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
* Build on OpenBSD by including <sys/socket.h> for setsockopt and ↵Devin Smith2015-07-171-0/+2
| | | | <netinet/in.h> for IPPROTO_TCP definition.
* Use WSAEWOULDBLOCK instead of EWOULDBLOCK on Win32win32_wouldblockAlan Antonuk2015-07-071-1/+14
| | | | These are not the same constants, rabbitmq-c fails on Win32 as a result.
* lib: remove unused buffer in amqp_tcp_socket.Alan Antonuk2015-05-311-3/+0
|
* lib: use TCP_NOPUSH on Mac OS X/*BSD.Alan Antonuk2015-05-311-0/+23
|
* lib: use MSG_MORE on Linux for basic.publishAlan Antonuk2015-05-311-5/+11
| | | | | | | | 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.
* Don't redefine EINPROGRESS EWOULDBLOCK on Win32.Alan Antonuk2015-05-041-4/+0
| | | | | These constants are already defined in the Win32, and they're being incorrectly redefined by rabbitmq-c.
* Fix int truncation warnings on Win32Alan Antonuk2015-05-041-0/+8
|
* Remove writev specific code.Alan Antonuk2015-05-031-106/+2
|
* Add support for send/writev in non-blocking modeAlan Antonuk2015-04-191-60/+31
|
* Return NEEDREAD status from amqp_tcp_socket_recvAlan Antonuk2015-04-191-4/+15
| | | | | When tcp socket is in non-blocking mode, return AMQP_STATUS_PRIVATE_SOCKET_NEEDREAD when socket doesn't have any data in it.
* Add blocks to allow compilation with C89 compilers.Alan Antonuk2014-12-291-77/+87
| | | | C89 compilers can't do mixed definitions and code.
* Check for double close/open in socket implAlan Antonuk2014-12-291-6/+19
| | | | | | | Check to state of socket when doing open/read/write/close to prevent double-open and double-close issues with the socket implementation. Fixes #228
* FIX: use correct buf/len when re-starting send()Alan Antonuk2013-08-231-1/+1
| | | | | | | Fix a bug that manifested itself by the broker disconnecting the client with an invalid_frame_end_marker error. The cause was when send() returned less than the size of the buffer to be sent we weren't using the correct parameters when restarting the send call.
* Add nonblocking connect supportzaq178miami2013-07-061-2/+2
|
* Get rid of amqp_socket_error interfaceAlan Antonuk2013-07-031-8/+0
| | | | | Get rid of experimental amqp_socket_error interface. Errors are returned using the error codes from the primary function
* Make connection the socket object ownerAlan Antonuk2013-07-031-12/+25
| | | | | | | | 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
* FIX: redecl of int i in amqp_tcp_socket_writevAlan Antonuk2013-06-181-1/+1
|
* Improve error handling in socket functionsAlan Antonuk2013-06-131-8/+175
|
* Expose public error-code interfaceAlan Antonuk2013-06-131-1/+6
| | | | | | | | | | 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.
* Updating license header in new filesAlan Antonuk2013-04-171-1/+1
|
* Fix code formatting to match the rest of the libAlan Antonuk2013-04-171-44/+44
|
* Adding vim modelines to new filesAlan Antonuk2013-04-171-0/+1
|
* Start addressing review commentsMichael Steinert2013-04-091-0/+125
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>