Luca Boccassi
821685f249
Merge pull request #3822 from somdoron/GROUPMAXLENGTH
...
problem: maximum size of group doesn't match the RFC maximum size
2020-02-09 13:10:47 +00:00
Doron Somech
05194eb549
problem: maximum size of group doesn't match the RFC maximum size
2020-02-09 14:46:23 +02:00
Simon Giesecke
f17a794d59
Merge pull request #3814 from bluca/sub_cancel_decoder
...
Implement ZMTP 3.1 subscribe/cancel via commands
2020-02-07 09:26:21 +01:00
Luca Boccassi
a7bb41ef77
Merge pull request #3820 from somdoron/WSENCODING
...
websocket problems
2020-02-06 16:39:38 +00:00
Doron Somech
652834296b
problem: ws_transport is missing the path the endpoint name
2020-02-06 17:22:28 +02:00
Doron Somech
071ec1a9bb
problem:Fallback to localhost in ws_address has no effect
...
Solution: return after the fallback
fixes #3809
2020-02-06 17:22:11 +02:00
Doron Somech
7bfd9512e6
problem: ws_encoder allocate a new msg for masking
...
solution: if msg is not shared or constant, mask the message in place
2020-02-06 09:34:22 +02:00
Luca Boccassi
38b6888c3e
Problem: libzmq does not advertise ZMTP 3.1
...
Solution: bump minor version number in the engine as all 3.1 features
are now implemented
2020-02-05 17:03:39 +00:00
Luca Boccassi
253e9dd27b
Problem: libzmq does not send ZMTP 3.1 sub/cancel commands
...
Solution: if all peers of a socket are >= 3.1 use sub/cancel commands
instead of the old 0/1 messages.
For backward compatibility, move the handling of 0/1 or sub/cancel
command strings to the encoders, so that the right thing can be done
depending on the protocol version.
Do not set the command flag until the encoder, so that we can handle
the inproc case (which skips the encoder).
2020-02-05 17:03:39 +00:00
Cameron Smith
49ecde8d80
support compiling with IBM XL 16.1 w/ clang front end
2020-02-05 11:00:34 -05:00
Simon Giesecke
495fb00b7e
Problem: pointee types are unnecessarily non-const
...
Solution: add const where possible
2020-02-04 18:34:19 +01:00
Simon Giesecke
db8f4fba21
Problem: redundant inline/ZMQ_FINAL declarations
...
Solution: remove them
2020-02-04 18:34:13 +01:00
Simon Giesecke
dfcca75d0b
Problem: curve_encoding_t build fails with old libsodium versions
...
Solution: add version check and fall back to old implementation for old versions
2020-02-04 10:04:40 +01:00
Simon Giesecke
4177bf7445
Problem: curve_encoding_t involves unnecesary heap allocations and copying of message data
...
Solution: use crypto_box_easy_afternm and crypto_box_open_easy_afternm
in-place
2020-02-03 22:33:15 +01:00
Simon Giesecke
4ad239acbc
Problem: curve encoding and decoding are not easily testable
...
Solution: extract into separate class curve_encoding_t
2020-02-03 17:07:15 +01:00
Simon Giesecke
3e394fddb4
Problem: naming convention violated by curve_mechanism_base
...
Solution: change to conform with naming convention
2020-02-03 11:44:10 +01:00
Simon Giesecke
406c423c9a
Problem: C-style casts used
...
Solution: use static_cast instead
2020-01-27 10:38:00 +01:00
Simon Giesecke
78961eeab7
Problem: non-modifying member functions not marked as const/static
...
Solution: add const/static
2020-01-27 10:38:00 +01:00
Simon Giesecke
41e3f14d6a
Problem: ptr/ref parameters and local variables are non-const but never modified
...
Solution: add const
2020-01-27 10:38:00 +01:00
Simon Giesecke
759fed8e7e
Problem: meaningless inline specified on function declarations
...
Solution: remove them
2020-01-27 10:38:00 +01:00
Simon Giesecke
f8f7913737
Problem: irregular loop conditions
...
Solution: use standard loop constructs and optimize some loops
2020-01-27 10:38:00 +01:00
Simon Giesecke
628adf1cb7
Problem: inconsistent polymorphic inheritance
...
Solution: consistently use virtual, override and final
2020-01-27 08:46:55 +01:00
Simon Giesecke
36a8df2f8c
Problem: sockets can be created after calling zmq_ctx_shutdown
...
Solution: fix handling of _starting and _terminate flags
Add tests for this situation.
Clarify documentation of zmq_ctx_shutdown and zmq_socket.
Fixes #3792
2020-01-26 18:06:14 +01:00
Denis Collette
64fc106123
Problem: preious commit contains tabs
...
Solution: replace tabs with spaces
2020-01-22 20:15:50 -04:00
Denis Collette
1450681fb4
Problem: Issue #3766 states that strtok is not thread safe and should be replaced
...
Solution: Replaced calls to strtok with strtok_r (strtok_s for windows)
in ws_engine.cpp
2020-01-22 19:40:26 -04:00
Luca Boccassi
ddae567f16
Problem: ZMQ_WSS socket options not defined in src/zmq_draft.h
...
Solution: add them
2020-01-19 14:39:29 +00:00
Matthias Loy
c357c378d8
fix: websocket url without path
...
websocket urls without a path caused crash!
2020-01-18 23:04:16 +01:00
Doron Somech
60ef14f80b
problem: ws_engine don't support WS RFC close control msg
...
Solution: when peer send a close msg, close the connection
2020-01-18 19:30:23 +02:00
Doron Somech
b120ec33a9
problem: ws_engine don't support WS RFC ping-pong
...
Solution: implement both PONG response and producing pings
2020-01-18 18:28:00 +02:00
Christoph Kahl
c5dab4f48f
mingw: add missing namespace
2020-01-09 21:44:53 +01:00
Simon Giesecke
73eb1eac05
Merge pull request #3767 from bluca/libbsd
...
Problems: reimplementation of strlcpy, CMake does not use pkg-config for NSS, wrong pc generated by autoconf with GNUTLS
2020-01-06 11:46:38 +01:00
xqcool
382c6d7186
Update array.hpp ( #3769 )
...
* Update array.hpp
Problem:Calling back on an empty container causes undefined behavior.
Solution:Check with the function empty()
* Create xqcool.mq
Adds relicensing grant
2020-01-01 10:37:51 +01:00
Luca Boccassi
3832bd6b11
Problem: UWP build fails
...
Solution: initialize local variable in all cases to false positive
compiler warning
2019-12-28 21:17:09 +01:00
Luca Boccassi
068385c951
Problem: internal reimplementation of strlcpy used by default on Linux
...
Solution: use libbsd by default when available, and the internal implementation
only as a fallback, to take advantage of Linux distros maintenance of the
string libraries.
2019-12-28 16:21:06 +01:00
Luca Boccassi
246cc77efc
Merge pull request #3763 from sigiesec/replace-strcpy
...
Avoid possible buffers overruns in ws_engine
2019-12-25 16:13:13 +01:00
Simon Giesecke
3dbbc28bb8
Problem: use of unsafe strcpy
...
Solution: use memcpy with known size instead
2019-12-25 13:56:26 +01:00
Simon Giesecke
334e837b88
Problem: ws_engine uses unsafe strcpy
...
Solution: use strcpy_s instead (define custom if not available)
2019-12-25 13:56:26 +01:00
Simon Giesecke
14ab794671
Problem: local functions not declared static
...
Solution: add static
2019-12-25 13:52:21 +01:00
Simon Giesecke
fa804c7783
Problem: pseudo-loops which had exactly one iteration
...
Solution: removed them
2019-12-25 13:52:21 +01:00
Simon Giesecke
579aa5b440
Problem: non-loop-variables initialized via loop initializer
...
Solution: move initialization to declaration
2019-12-25 13:52:21 +01:00
Simon Giesecke
d4cc592387
Problem: loop variable modified in loop step and body
...
Solution: modify it in loop body only
2019-12-25 13:52:21 +01:00
Simon Giesecke
ddbf45cf8d
Problem: redundant break after return
...
Solution: remove them
2019-12-24 10:17:10 +01:00
Simon Giesecke
2256bd5b0b
Problem: unnecessary copying of string literals
...
Solution: just copy the address
2019-12-23 14:12:07 +01:00
Simon Giesecke
4c3f115469
Problem: raw malloc used unnecessarily
...
Solution: use std::string instead
2019-12-23 14:12:07 +01:00
Simon Giesecke
30e2398e67
Problem: WSS-specific members and options are compiled without ZMQ_HAVE_WSS
...
Solution: properly guard members and options
2019-12-23 11:58:07 +01:00
Simon Giesecke
9e548bd591
Problem: insecure and inefficient strcpy used
...
Solution: use memcpy with known length
2019-12-23 11:58:07 +01:00
Simon Giesecke
9f16513ebe
Problem: loop sending signaler event is obscure
...
Solution: add comments and remove continue/break
2019-12-10 16:19:25 +01:00
Simon Giesecke
3ace237988
Revert "Removed unreachable code paths"
...
This reverts commit 4f77cfa327
.
2019-12-10 16:08:52 +01:00
Simon Giesecke
f60f909899
Problem: missing use of C++11 = delete and = default
...
Solution: introduce macros ZMQ_DEFAULT and ZMQ_NON_COPYABLE_NOR_MOVABLE
2019-12-09 09:48:21 +01:00
Simon Giesecke
86d7de38ca
Problem: redundant empty destructor
...
Solution: Remove definition
2019-12-08 19:43:31 +01:00
Simon Giesecke
f8adf9ea55
Problem: unnecessary value parameters
...
Solution: change to const references
2019-12-08 15:24:48 +01:00
Simon Giesecke
cb2b377d9f
Problem: redundant else after return
...
Solution: remove else
2019-12-08 15:24:48 +01:00
Simon Giesecke
fdabd73da6
Problem: parameters not const where const possible
...
Solution: add const
2019-12-08 15:24:48 +01:00
Simon Giesecke
84267e734b
Problem: inconsistent parameter names on definition/declaration
...
Solution: align them
2019-12-08 15:24:48 +01:00
Simon Giesecke
cd954e207d
Problem: use of C-style casts
...
Solution: use static_cast/reinterpret_cast instead
2019-12-08 15:24:48 +01:00
Simon Giesecke
a83c57d0bb
Problem: identifiers not conformant with naming convention
...
Solution: fix identifier names
2019-12-08 15:24:48 +01:00
Luca Boccassi
df993d113c
Merge pull request #3751 from sigiesec/windows-domain-sockets-signaler
...
Use Unix domain sockets for listener when available on Windows
2019-12-07 00:25:21 +00:00
Simon Giesecke
ca552d563f
Problem: listener socket uses TCP loopback connections which sometimes go awry
...
Solution: Use domain sockets instead if available
2019-12-06 19:11:50 +01:00
Simon Giesecke
bd4c2d60ba
Problem: zmq::listener_t::create_wildcard_address not reusable in ip.cpp
...
Solution: move to ip.hpp as zmq::create_ipc_wildcard_address
2019-12-06 19:11:50 +01:00
Simon Giesecke
3bcaea535c
Problem: zmq_fdpair function is very long
...
Solution: Extract TCP/IP loopback variant into zmq_fdpair_tcpip
2019-12-06 17:51:13 +01:00
liedtkeInTUM
65d2f1f498
Problem: if IPC enabled libzmq does not compile when in uwp build ( #3747 )
...
* Problem: if IPC enabled libzmq does not compile when in uwp build
* Problem 10.0.##### can be valid windows target versions
* Problem: No builds are triggered on uwp platform
* Problem: epoll is set before UWP platform is checked
* Problem: used wrong CMAKE_SYSTEM_NAME specifier
* Problem: build tests fails during cmake configure
* Use Win32 build step for Win32-uwp platform
* Disable compile options that produce warnings that leads to a ci fail
* winnt version is set by cmake, no need for redefinition in windows.hpp
* Eliminate all warning according Incremental and opt:icf are specified
* Prefer to disable opt flags in debug config rather than incremental linking
* CMAKE_GENERATOR should not include uwp definition
* Add release build with uwp configuration
* Problem: pointer potentially uninitialized
2019-12-06 13:27:24 +00:00
Andrij Abyzov
5a854780f2
Problem: cannot send arbitrary data from XSUB to XPUB.
...
Solution: now if the first frame in a multipart message is not subscribe/unsubscribe,
the rest of the parts are also considered to be not subscribe/unsubscribe.
2019-12-04 16:25:08 +01:00
Luca Boccassi
a61db18eee
Problem: WSS LAST_ENDPOINT returns WS transport
...
Solution: add wss_address_t subclass of ws_address_t to override the
to_string method
2019-11-28 12:37:53 +00:00
Luca Boccassi
c711941e9a
Problem: wildcard port binding does not work with WS sockets
...
Solution: remove the path from the address when resolving
2019-11-28 09:27:05 +00:00
Luca Boccassi
79d75f017c
Problem: WS sockets return TCP protocol strings with ZMQ_LAST_ENDPOINT
...
Solution: use the correct address class when resolving
2019-11-28 09:27:05 +00:00
Andrij Abyzov
04761133bf
Fix zmq::select_t::loop formatting
2019-11-20 09:29:59 +01:00
Andrij Abyzov
108977c838
Change XSUB -> XPUB multipart message processing.
...
Now only the first part in a multipart message will be treated as subscribe/unsubscribe.
The rest will be considered user messages regardless of the first byte.
2019-11-19 18:22:12 +01:00
Luca Boccassi
9ced36e407
Problem: WSAEventSelect checks for FD_OOB, but select does not
...
WSAEventSelect is used on Windows (when select is the polling method)
only if waiting for more than one socket family, excluding IPv4/6.
It is then passed FD_OOB, which means it can be woken by OOB messages,
but select later on never checks for it.
Remove FD_OOB as it's not actually used for anything.
2019-11-01 09:34:03 +00:00
Simon Giesecke
302436515c
Problem: windows socket error number cleared before saved to saved_errno
...
Solution: call tune_socket only if connect was successful
2019-10-29 23:04:54 +01:00
Simon Giesecke
66d0f3511f
Problem: ipc transport not supported under Windows
...
Solution: implement support
2019-10-29 23:04:54 +01:00
Simon Giesecke
7f43e7ff75
Problem: build targeting Windows XP is broken
...
Solution: fix build issues
2019-10-19 14:04:55 +02:00
Michele Dionisio
9f65720dc0
Revert "Problem: pkg-config file cannot be used for static linking on CentOS 7"
...
This reverts commit 765c24740d
.
2019-10-14 20:43:33 +02:00
Luca Boccassi
683bf1d732
Merge pull request #3713 from mdionisio/useless_ceil
...
avoid to use std::ceil
2019-10-14 15:53:39 +01:00
Michele Dionisio
f07f47b1e3
avoid to use ceil function
...
ceil function is usually in math library that can be avoided as dependency
2019-10-14 16:18:27 +02:00
Chih-Hsuan Yen
765c24740d
Problem: pkg-config file cannot be used for static linking on CentOS 7
...
Solution: add -lm to Libs.private of libzmq.pc so that the std::ceil
usage in src/decoder_allocators.cpp is satisfied during static linking
on CentOS 7.
See https://github.com/zeromq/libzmq/issues/3710 for a reproducer.
2019-10-12 22:36:31 +08:00
somdoron
9b15658eb1
problem: zero-sized messages cause assertion when glibc assertion are on
...
Solution: when a zero-sized message is encoded or decoded avoid mem copy
2019-10-07 09:11:44 +03:00
somdoron
618227f63c
problem: GNUTLS handshake is getting blocked because of timeout on some versions
...
Solution: disable handshake timeout
2019-10-06 11:05:56 +03:00
somdoron
a9bb526403
problem: wss transport return incorrect return code for error
...
Solution: return -1 for errors
2019-10-04 20:46:00 +03:00
somdoron
2018be643a
problem: valgrind complain about uninitialized value
...
Solution: initialize the value
2019-10-04 17:13:48 +03:00
somdoron
977f137a83
problem: cannot check WS and WSS capability
...
Solution: add capability check to zmq_has
2019-10-04 16:27:36 +03:00
somdoron
41b9af2c79
problem: WS transport doesn't support mechanism
...
Solution: add support to mechanism
2019-10-04 16:24:48 +03:00
somdoron
7296fb5b15
problem: unsecured websocket is rarely used in production
...
Solution: support websocket with tls (wss)
2019-10-02 08:58:26 +03:00
trya
2fe9dd9101
Problem: ZMQ_CONFLATE on PUB sockets delivers to only one subscriber at most
...
Solution: Fix behavior of dbuffer on writes. Message passed in argument
of dbuffer::write can be assigned directly to the back buffer without
leaking, since the message has already the right reference count (see
dist::distribute and msg_t::add_refs). Secondly, in order to prevent the
message pending in the front buffer from leaking if it hasn't been
closed yet (for example because the peer is not reachable anymore), move
back buffer to front buffer using msg_t::move instead of swapping the
buffers, thus allowing release of the message in the front buffer.
2019-09-24 02:57:24 +02:00
somdoron
9be8334938
problem: sha1 external module conflict with czmq
...
Solution: allow to use external library (nss) for sha1 to avoid the conflict
2019-09-11 15:01:28 +03:00
somdoron
52e0d965b3
problem: ws_engine doesn't check Sec-WebSocket-Protocol
...
Solution: Validate Sec-WebSocket-Protocol and make sure ZWS2.0 is one of the protocols
2019-09-05 23:11:29 +03:00
somdoron
a48fdd6a7f
problem: ws_engine doesn't send correct host and path
...
Solution: extract path and host from the address
2019-09-05 17:33:38 +03:00
Luca Boccassi
6fb8ef0711
Problem: can no longer send user data from XSUB to XPUB
...
Solution: fix regression introduced by:
https://github.com/zeromq/libzmq/pull/3168
Correctly fall back to user message if the first byte is neither 0 nor
1, and add a simple unit test
Fixes https://github.com/zeromq/libzmq/issues/3656
2019-09-02 11:33:19 +01:00
Francesco Montorsi
b3582da8fb
Introduce extended set/get methods for ZMQ contexts ( #3642 )
...
* Introduce DRAFT zmq_ctx_set_ext() and zmq_ctx_get_ext() methods. Change
ZMQ_THREAD_NAME_PREFIX to allow for non-numeric thread name prefixes.
2019-08-27 23:41:23 +01:00
Andrei Tomashpolskiy
2aa87c94cc
UDP engine aborts on networking-related errors from socket syscalls (2) #2862 ( #3640 )
...
* UDP engine aborts on networking-related errors from socket syscalls #2862
2019-08-25 15:55:42 +01:00
Andrei Tomashpolskiy
f48c86d077
UDP engine aborts on networking-related errors from socket syscalls #2862 ( #3638 )
...
* UDP engine aborts on networking-related errors from socket syscalls #2862
* Add relicense statement
2019-08-22 18:52:31 +01:00
Luca Boccassi
9bb197e030
Merge pull request #3613 from TomzBench/mingw-fix
...
no void pointer to store function pointer
2019-08-19 11:15:29 +01:00
Simon Giesecke
e9b67001dd
Problem: invalid syntax for calling convention on function pointer
...
Solution: fix syntax and formatting, remove C-ism for defining struct
2019-08-19 10:13:11 +02:00
Luca Boccassi
87988bf4c8
Problem: formatting error
...
Solution: run make clang-format-diff to fix it
2019-08-11 12:00:13 +01:00
thomas
64d58c432c
relicense add
2019-08-10 11:15:26 -04:00
thomas
87b81926aa
no void pointer to store function pointer
2019-08-10 10:43:28 -04:00
Christopher Hall
72854e6342
problem: DragonFly BSD does not allow mapping global IPv4 addresses when IPv6 is used
...
solution: Handle as for OpenBSD by not attemption to set this option on the socket
Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>
2019-08-06 12:11:06 +08:00
Luca Boccassi
4d5e97adac
Problem: formatting errors introduced by #3601
...
Solution: fix them with make clang-format-diff
2019-07-30 13:43:48 +01:00
Jacques Germishuys
b3123a2fd1
Problem: __try and __except isn't universally supported on windows
...
Solution: Manually push/pop an exception registration record.
Only set the thread name with a debugger present
2019-07-30 11:31:22 +01:00
Shubham Lagwankar
f07d88be09
Problem: redundant check in condition
...
Solution: remove it
2019-07-26 11:43:57 -04:00
aixxe
63409579e7
Problem: Usage of 'if_nametoindex' not supported in Windows XP.
...
Solution: Add ZMQ_HAVE_WINDOWS_TARGET_XP check to src/udp_address.cpp.
2019-07-25 20:38:54 +01:00
Mancaș George
13387c5cdc
Problem: stream_engine use after free
...
Solution: Don't allow concurrent heartbeat timers
2019-07-24 13:04:32 +00:00
Luca Boccassi
a56d36b8e5
Merge pull request #3587 from somdoron/stream_engine_base
...
problem: ws_engine duplicate code from stream_engine
2019-07-18 11:57:27 +01:00
somdoron
157b2a2ee0
problem: ws_engine duplicate code from stream_engine
...
Solution: New class called stream_engine_base which is inherited by ws_engine, zmtp_engine and raw_engine.
2019-07-18 11:28:08 +03:00
Luca Boccassi
7262701876
Problem: build on centos6/ubuntu12 still broken
...
Solution: move the definition of __STDC_LIMIT_MACROS somewhere the test actually uses
2019-07-16 18:15:47 +01:00
Luca Boccassi
496c8eb05a
Problem: missing copyright and license header from new file
...
Solution: add it
2019-07-16 17:37:40 +01:00
Luca Boccassi
10a0baf691
Problem: wrong copyright dates in newly added files
...
Solution: fix them
2019-07-16 17:36:44 +01:00
Luca Boccassi
38c31154d0
Problem: build broken with older compilers
...
Solution: define __STDC_LIMIT_MACROS before including stdint.h so that SIZE_MAX
is defined
2019-07-16 17:34:58 +01:00
Luca Boccassi
3692b26649
Merge pull request #3579 from somdoron/zws2
...
problem: browser cannot communicate with zeromq directly
2019-07-16 13:28:30 +01:00
somdoron
39941a0c82
problem: browser cannot communicate with zeromq directly
...
Solution: implement ZWS 2.0 which websocket transport for zeromq
2019-07-16 10:12:20 +03:00
Simon Giesecke
1781cff37b
Problem: plaintext secrets placed in insecure memory
...
Solution: Use secure_allocator_t for plaintext secrets
2019-07-14 17:12:39 +02:00
Simon Giesecke
92dbb4caee
Problem: no C++ style secure memory allocator available
...
Solution: Added secure_allocator_t based on libsodium's memory management functions when available
2019-07-14 17:12:39 +02:00
Doron Somech
9c5cf8573c
Merge pull request #3573 from sigiesec/use-std-vector
...
Problem: use of malloc is error-prone
2019-07-10 20:07:33 +03:00
Simon Giesecke
1de4cf6ffa
Problem: use of malloc is error-prone
...
Solution: use std::vector instead, simplify control-flow
2019-07-10 18:26:58 +02:00
Luca Boccassi
c819eedd89
Problem: missing rc checks in udp_engine
...
Solution: add them
2019-07-09 17:25:58 +01:00
Thomas M. DuBuisson
90ff30c086
Free memory when curve_client sends invalid ready message.
2019-07-08 21:05:36 -07:00
Luca Boccassi
8e6bafcbe0
Problem: application metadata not parsed correctly when using CURVE
...
Solution: create buffers large enough to contain arbitrary metadata
2019-07-08 10:47:27 +01:00
Luca Boccassi
ddd0da2f57
Merge pull request #3476 from TomMD/fix/memory-leak
...
Request handling leaked memory. Depending on the application's use o…
2019-07-06 10:05:25 +01:00
Thomas M. DuBuisson
367cedb7c6
Fix request-handling memory leak
2019-07-05 16:53:46 -07:00
Shubham Lagwankar
1186e9868a
Problem: code doesn't follow libzmq naming conventions
...
Solution: rename types/variables that are inconsistent
2019-06-28 11:57:45 -04:00
Luca Boccassi
a43c842e0d
Merge pull request #3556 from ssbl/better-names
...
Problem: variable and type names are not descriptive
2019-06-27 18:23:19 +01:00
Shubham Lagwankar
d1e6fe19b4
Problem: variable and type names are not descriptive
...
Solution: use more descriptive names
This commit also improves comments related to some of the changes.
2019-06-27 11:57:01 -04:00
jean-airoldie
cfcab66c71
Problem: {in,out}_batch_size must be configured at compiled time
...
Solution: Added a socket option to configure them at runtime.
2019-06-27 02:31:11 -04:00
Shubham Lagwankar
15dafb1c1c
Problem: radix tree's apply function uses incorrect resizing logic ( #3548 )
...
* Problem: radix tree's apply function uses incorrect resizing logic
Solution: rewrite the function using a vector
The buffer is extended once by 256 bytes, which will not be enough if
the node holds data larger than this number.
2019-06-20 07:58:08 +01:00
Luca Boccassi
3c06ec118f
Problem: formatting errors
...
Solution: apply clang-format-diff
2019-06-11 10:31:15 +01:00
Philippe Bernardino Leite
8a02f70706
pthread_equal to compare thread ids
...
I am trying to port ZeroMQ to z/OS USS and I faced several problems. One of them is this function "is_current_thread" trying to compare two thread ids with operator "==". I've changed the code to use the official function "pthread_equal" to compare thread ids and now it's working fine.
2019-06-10 22:10:01 -03:00
Christophe Guillon
58c30dc7d1
Add support for SOCKS5 basic authentication
2019-06-10 16:40:06 +02:00
Christophe Guillon
42cfa697f2
Fix issues with SOCKS5 proxy connection
...
Two issues where introduced by commit 12c4b55a
:
- the proxy connection was done to the target address instead of
the proxy address
- on error the proxy connection status was not reset to unplugged
2019-06-10 14:32:20 +02:00
Romain Moret
5b07a1199c
Fix compiler error
2019-05-21 15:07:00 +02:00
Romain Moret
27005cc1ae
Implement thread name on windows, cleanup thread naming internals
2019-05-21 12:12:19 +02:00
Doron Somech
046ccfc408
Merge pull request #3513 from bluca/clang7
...
Problem: clang-format 5 has issues with comments
2019-05-18 19:18:42 +03:00
Luca Boccassi
bde18f3ede
Problem: comments before ifdefs are wrongly formatted
...
Solution: now that clang-format 6+ is used in the CI, fix it
2019-05-18 17:09:17 +01:00
Luca Boccassi
19ff4d0b6a
Problem: zmq_socket_monitor_versioned_typed duplicates zmq_socket_monitor_versioned
...
Solution: unify the two APIs, as they are both still in DRAFT state and
thus can be changed.
2019-05-18 16:44:07 +01:00
Luca Boccassi
41be0f5386
Problem: new xpub option is in critical path
...
Solution: use unlikely to optimize for the most common case
2019-05-18 16:44:07 +01:00
Luca Boccassi
a53dfe936a
Problem: many unnecessary ifdefs covering new xpub option
...
Solution: remove them, only public headers have to be ifdef'd
2019-05-18 16:44:07 +01:00
imkcy9
2f98f7034b
Support XPub socket send last value caching to last subscription pipe with ZMQ_XPUB_MANUAL_LAST_VALUE. ( #3511 )
...
* Add ZMQ_XPUB_MANUAL_LAST_VALUE
* Surpport xpub send last value caching to one pipe with ZMQ_XPUB_MANUAL_LAST_VALUE
* Add test_xpubub_manual_last_value
* Add relicense and doc
2019-05-17 22:12:32 +01:00
jean-airoldie
606a8f7967
Problem: Socket monitoring only allows ZMQ_PAIR
...
Solution: Allow ZMQ_PUB and ZMQ_PUSH sockets types for the monitoring.
This way someone could create a ZMQ_PULL socket connected to multiple
monitoring sockets at the same time.
2019-05-15 01:48:46 -04:00
Simon Giesecke
6e1c58e86e
Problem: PLAIN HELLO message incorrectly uses WELCOME literal
...
Solution: change to HELLO
2019-05-10 03:55:07 -04:00
Simon Giesecke
d46c580977
Problem: signature of zmq_poller_fd does is incompatible with regular error handling
...
Solution: change return type to int (again) and return fd via an output parameter
2019-05-09 11:09:35 -04:00
Simon Giesecke
63c4d8be78
Problem: syntax error on Windows related to socket descriptor type
...
Solution: use proper fd_t type, and also define and use a zmq_fd_t in the API
2019-05-09 07:21:08 -04:00
jean-airoldie
cdbe120738
Problem: No invalid pointer handling for zmq_poller_fd
...
Solution: Add some and document it.
2019-05-02 17:10:20 -04:00
jean-airoldie
046534480b
Problem: Cannot get thread safe socket fd
...
Solution: Add a method to get the zmq_poller's signaler fd. Then we can
associate a poller instance with every thread safe socket and use its
fd.
2019-04-27 22:58:42 -04:00
Shubham Lagwankar
e9678efe00
Problem: unused Windows-specific code in sleep_ms
...
Solution: remove it since sleep_ms isn't used on Windows
2019-04-24 14:39:27 -04:00
Rosen Penev
091e15a28d
Add <ios> include to fix uClibc++ compilation
...
Under uClibc++, streamoff is defined in <ios>. This header is needed to fix compilation.
2019-04-19 12:16:01 -07:00
Luca Boccassi
3c21eed0a1
Problem: CI format check fails
...
Solution: fix it
2019-04-06 00:12:32 +01:00
Serhio
db7bdd1b1a
Some explicit endpoint type changes to support GCC 5 ( #3468 )
...
* Some explicit endpoint type changes to support GCC 5
* ../RELICENSE/SergheiNovac.md
2019-04-05 10:54:26 +01:00
Simon Giesecke
42e27b7d0d
Problem: socket returned by ZMQ_FD cannot be used with CreateIoCompletionPort
...
Solution: add WSA_FLAG_OVERLAPPED socket flag
2019-03-27 09:56:11 +01:00
Simon Giesecke
47dba21005
Problem: code is unnecessarily imperative
...
Solution: make more functional-style
2019-03-24 13:46:15 -04:00
Simon Giesecke
1450830611
Problem: unused include directives
...
Solution: remove and add where needed
2019-03-23 09:46:37 -04:00
Simon Giesecke
2f40d21618
Problem: access to moved object
...
Solution: use move target instead
2019-03-22 12:06:12 -04:00
Simon Giesecke
e17232f725
Problem: possible use-after-free
...
Solution: check for failure and do not access any members afterwards
2019-03-22 12:06:12 -04:00