Commit Graph

76 Commits

Author SHA1 Message Date
Constantin Rack
022cf2aeaa Problem: source code contains tabs
Solution: replace tabes with spaces
2016-09-17 08:44:00 +02:00
evoskuil
2b798e486a Problem: name conflicts from windows.h, draft API declared in pch. 2016-05-13 20:41:26 -07:00
Osiris
4a5af9d58b Problem: Precompiled headers not being used
Solution: Phase I - make precompiled.hpp be first file included in every source file
2016-02-18 10:56:52 -06:00
Constantin Rack
a539b0c6e8 Problem: copyright year is still 2015
Solution: update to 2016
2016-01-28 15:07:31 +01:00
reza.ebrahimi
8e6ef4616e changing some camelCase variable names to snake_case in previous commit 2015-08-14 16:56:07 +04:30
reza.ebrahimi
d7b74d1f57 remove unnecessary multiple WSAGetLastError() calls 2015-08-14 16:29:18 +04:30
Pieter Hintjens
8620c3e032 Problem: source file headers are somewhat confusing about LGPLv3
Of course people still "can" distributed the sources under the
LGPLv3. However we provide COPYING.LESSER with additional grants.

Solution: specify these grants in the header of each source file.
2015-06-02 22:33:55 +02:00
Pieter Hintjens
94d9a4ffdf Problem: copyright statements are out of date
Solution: update for 2015

Fixes #1320
2015-01-22 10:32:37 +01:00
Jan Kryl
cc4c37dc62 program dumps core when getpeername() returns EINVAL (#1085) 2014-06-10 16:11:00 -04:00
Bruno Bigras
e8a13c44b0 Fix a strict-aliasing with type-punning
Fixes #880
2014-02-13 12:06:10 -05:00
Pieter Hintjens
4f56631f78 Fixed issue #868 2014-02-03 11:16:49 +01:00
Pieter Hintjens
b3b9e046ee Updated copyright statements for 2014 2014-01-02 12:00:57 +01:00
Brandon Carpenter
a018ef5e86 Add support for extending ZAP request address with IPC peer credentials.
Another take on LIBZMQ-568 to allow filtering IPC connections, this time
using ZAP.  This change is backward compatible.  If the
ZMQ_ZAP_IPC_CREDS option is set, the user, group, and process IDs of the
peer process are appended to the address (separated by colons) of a ZAP
request; otherwise, nothing changes.  See LIBZMQ-568 and zmq_setsockopt
documentation for more information.
2013-12-06 14:28:44 -08:00
Richard Newton
abbe704d9e Fix windows build for type of service. 2013-11-25 09:25:23 +00:00
Chris Laws
38bceca9ca Add ability to set and get DSCP socket option 2013-11-25 13:31:21 +10:30
Richard Newton
e16a6af0c7 Fix compile error on windows. 2013-08-08 17:27:49 +01:00
Martin Hurton
7541debe6d Add get_peer_ip_address utility function
The functon returns string representation of peer's
IP address. We will need this to update ZAP implementation.
2013-07-18 10:41:31 +02:00
Pieter Hintjens
f0f16505e5 Removed corporate advertisements from source file headers
Copyrights had become ads for Sustrik's corporate sponsors, going against the original
agreement to share copyrights with the community (that agreement was: one line stating
iMatix copyright + one reference to AUTHORS file). The proliferation of corporate ads
is also unfair to the many individual authors. I've removed ALL corporate title from
the source files so the copyright statements can now be centralized in AUTHORS and
source files can be properly updated on an annual basis.
2013-03-12 13:24:57 +01:00
Matt Arsenault
6ecb796e77 Fix warnings with MinGW 2013-01-02 03:24:11 -05:00
Matt Arsenault
73c370dd17 Fix inconsistently using #if or #ifdef instead of #if defined 2013-01-02 03:24:10 -05:00
jdc8
98ee759dad Added missing semi-colon. 2012-06-19 09:37:06 -04:00
Martin Hurton
7d99129411 Fix open_socket to return -1 (INVALID_SOCKET on Windows) on error 2012-06-16 21:46:20 +02:00
Ian Barber
eb14890d23 Revert "Revert "Merge branch 'master' of github.com:ianbarber/libzmq""
This reverts commit 029d3dfae2.
2012-06-12 14:43:18 +01:00
Ian Barber
029d3dfae2 Revert "Merge branch 'master' of github.com:ianbarber/libzmq"
This reverts commit 3345902979, reversing
changes made to 889b0e6f29.
2012-06-12 14:13:17 +01:00
Hiten P
db13fbf4a9 Consolidate TCP-specific common code into their own files.
The TCP keepalive tuning code has been moved into the newly added
files; this also allows future TCP-specific code to be added into
these files, without bloating the IP level code and establishes a
known file structure for other IP-based transports.

Remember: this is a no-op change, hence no API or functionality
was changed as part of this commit.
2012-06-08 18:18:52 +01:00
unknown
5fe6ddfda3 On Windows, preventing sockets to be inherited by child processes. 2012-05-07 15:46:55 +02:00
Sergey KHripchenko
c77dc98b5c some spaces cleanups + delete unused anymore zmq::max_sockets + some minor code chages 2012-04-13 13:26:57 +04:00
Sergey KHripchenko
4b303402a7 more flexible keepalive options detection + awful options documentation 2012-04-06 20:04:35 +04:00
Sergey KHripchenko
0c3d917926 initial implementation of tuning TCP keep-alives for TCP socket
currently not fully cross-platform
work on linux
possibly work in *bsd
and could be enhanced to work on windows
2012-04-05 19:39:53 +04:00
Martin Sustrik
8e21d64c97 Copyright dates adjusted to reflect reality
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-01 18:06:11 +01:00
Martin Sustrik
ac7717b7b3 250bpm copyrights added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-10-31 16:20:30 +01:00
Mikko Koppanen
6c1b50cfab Added compile-time test for SOCK_CLOEXEC
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-10-26 11:26:00 +02:00
Martin Sustrik
8b7ac4c2a9 Close file descriptors on exec (issue 218)
When exec is executed to start a different process image old
0MQ file descriptors could stay open, thus blocking TCP ports
and alike. This patch should solve the problem.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-02 15:34:12 +02:00
Martin Sustrik
f0c7edbc9c Missing include added to ip.cpp
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-18 21:16:22 +02:00
Martin Sustrik
b6ecb00d23 TCP address related functionality moved to tcp_address_t
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-18 17:40:42 +02:00
Martin Sustrik
b01a8e1751 IPC address related functionality refactored into ipc_address_t class
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-18 11:08:22 +02:00
Ghislain Putois
85851d3127 Preliminary Android support
Some small changes to prepare a cross-compilation for the Android platform

Signed-off-by: Ghislain Putois <ghpu@infonie.fr>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-15 19:39:21 +02:00
Steven McCoy
57440b86e2 Add IPv6 support to tcp_listener
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-15 08:56:00 +02:00
Martin Sustrik
9380098534 Compilation error on HP-UX and AIX fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-14 14:06:42 +02:00
Martin Sustrik
6dc3b2a657 Compilation error on FreeBSD fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-14 13:48:28 +02:00
Steven McCoy
c27b9ac7de Update resolve_ip_interface and resolve_ip_hostname with ipv4only parameter.
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-08 15:23:46 +02:00
Steven McCoy
9184a54f64 Update resolve_nic_name to take more generic sockaddr parameter.
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2011-08-08 12:39:13 +02:00
Martin Sustrik
d5f3628ad0 Different connecters simplified
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-29 09:37:43 +02:00
Martin Sustrik
b45fec337a Tuning of TCP sockets is done at a single place
Instead of being spread throughout the codebase, the tuning
is done in tune_tcp_socket() function.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-28 15:13:04 +02:00
Andrew Thompson
4f4cc73280 Use strrchr to ensure we split off the last colon for the service port
IPv6 addresses have colons and will produce invalid data for the getaddrinfo lookup.

Signed-off-by: Andrew Thompson <andy@fud.org.nz>
2011-06-29 23:48:19 +02:00
Paul Colomiets
38e5f8699c Better handling of memory error in resolve_ip_hostname
Signed-off-by: Paul Colomiets <pc@gafol.net>
2011-05-17 10:12:27 +02:00
Martin Sustrik
49df2f416c Fixes warning when compiling with MSVC on Win64
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-15 13:12:09 +02:00
Martin Sustrik
e0246e32d7 Message-related functionality factored out into msg_t class.
This patch addresses serveral issues:
1. It gathers message related functionality scattered over whole
   codebase into a single class.
2. It makes zmq_msg_t an opaque datatype. Internals of the class
   don't pollute zmq.h header file.
3. zmq_msg_t size decreases from 48 to 32 bytes. That saves ~33%
   of memory in scenarios with large amount of small messages.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-21 22:27:48 +02:00
Martin Sustrik
7b95c5920c Windows build fixed
Compilation of ip.cpp have failed because EPROTONOSUPPORT
was undefined. Including zmq.h should help as the error
code is defined there.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-09 16:34:37 +01:00
Brett Cameron
b00be2651c Different fixed to make OpenVMS port work.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-08 14:39:52 +01:00