1. 27 Mar, 2017 1 commit
  2. 04 Jan, 2017 1 commit
    • Luca Boccassi's avatar
      Problem: peer can close connection before SO_NOSIGPIPE is set · 31a3a068
      Luca Boccassi authored
      Solution: setsockopt returns EINVAL if the connection was closed by
      the peer after the accept returned a valid socket. This is a valid
      network error and should not cause an assert.
      To handle this we have to extract the setsockopt from the stream
      engine, as there's no clean way to return an error from the
      constructor. Instead, try to set this option before creating the
      engine in the callers, and return immediately as if the accept
      had failed to avoid churn. Do the same for the connect calls by
      setting the option in open_socket, so that the option for that
      case is set even before connecting, so there's no possible race
      condition.
      Since this has to be done in 4 places (tcp/ipc listener, socks
      connecter and open_socket) add an utility function in ip.cpp.
      Fixes #1442
      31a3a068
  3. 01 Jan, 2017 2 commits
    • Vincent Tellier's avatar
      Handshake events null pointer fix · 7e36db07
      Vincent Tellier authored
      The mechanism is instanciated during the handshake itself, when and
      error happen before this, the error method shall work anyway.
      An error handling with a NULL mechanism means the handshake fail, so the
      handshake failure event is also raised in this case.
      7e36db07
    • Vincent Tellier's avatar
      Fixed issue #2227 second part · ffb31dca
      Vincent Tellier authored
       - removed the previously added encryption_error, less changes less bug
       - handshake fail is now signaled when an error happen while the
         mechanism is still hanshaking
      ffb31dca
  4. 30 Dec, 2016 3 commits
    • Luca Boccassi's avatar
      Problem: new DRAFT monitor events returned even without --enable-draft · c0e2bc4e
      Luca Boccassi authored
      Solution: wrap the event triggering in the DRAFT ifdef as well as the
      defines. This ensures that the event are returned only if the
      library was built with DRAFTs enabled.
      
      Also update the test case to expect the new events since it uses
      the catch-all mask. Although the sequence of event is different and
      this might be considered as an API breakage, using the catch-all
      ZMQ_EVENT_ALL mask implies that, well, all events are monitored so
      it's normal that new ones will be added.
      Users that don't want this kind of behaviour to change can simply
      monitor only the event that they care about.
      c0e2bc4e
    • Vincent Tellier's avatar
      Code formatting + reverted hard error handshake fail · 48bc75e8
      Vincent Tellier authored
       - Moved new events in draft section + added to zmq_draft.h
       - Removed the remainning tabs
       - Reverted the hard error (back to soft error) in curve_server.cpp
      
      => The feature doesn't works anymore
      48bc75e8
    • Vincent Tellier's avatar
      Fixed issue #2227 · b6e9e0c2
      Vincent Tellier authored
      Added two new monitoring events:
       - ZMQ_EVENT_HANDSHAKE_SUCCEED is raised once the encryption handshake succeed
       - ZMQ_EVENT_HANDSHAKE_FAILED is raised when it failed
      Both events are raised on server and client side.
      b6e9e0c2
  5. 15 Dec, 2016 1 commit
  6. 05 Nov, 2016 1 commit
  7. 01 Oct, 2016 2 commits
  8. 01 Jun, 2016 1 commit
  9. 14 May, 2016 1 commit
  10. 04 May, 2016 2 commits
  11. 03 May, 2016 1 commit
  12. 21 Feb, 2016 3 commits
  13. 18 Feb, 2016 2 commits
  14. 11 Feb, 2016 1 commit
    • Pieter Hintjens's avatar
      Problem: use of libsodium vs. tweetnacl is confused · b49a6041
      Pieter Hintjens authored
      It's unclear which we need and in the source code, conditional code
      treats tweetnacl as a subclass of libsodium, which is inaccurate.
      
      Solution: redesign the configure/cmake API for this:
      
      * tweetnacl is present by default and cannot be enabled
      * libsodium can be enabled using --with-libsodium, which replaces
        the built-in tweetnacl
      * CURVE encryption can be disabled entirely using --enable-curve=no
      
      The macros we define in platform.hpp are:
      
          ZMQ_HAVE_CURVE    1        //  When CURVE is enabled
          HAVE_LIBSODIUM    1        //  When we are using libsodium
          HAVE_TWEETNACL    1        //  When we're using tweetnacl (default)
      
      As of this patch, the default build of libzmq always has CURVE
      security, and always uses tweetnacl.
      b49a6041
  15. 09 Feb, 2016 1 commit
    • Pieter Hintjens's avatar
      Problem: ZMQ_TCP_RECV_BUFFER/SEND_BUFFER are redundant · 7470c00d
      Pieter Hintjens authored
      These options are confusing and redundant. Their names suggest
      they apply to the tcp:// transport, yet they are used for all
      stream protocols. The methods zmq::set_tcp_receive_buffer and
      zmq::set_tcp_send_buffer don't use these values at all, they use
      ZMQ_SNDBUF and ZMQ_RCVBUF.
      
      Solution: merge these new options into ZMQ_SNDBUF and ZMQ_RCVBUF.
      
      This means defaulting these two options to 8192, and removing the
      new options. We now have ZMQ_SNDBUF and ZMQ_RCVBUF being used both
      for TCP socket control, and for input/output buffering.
      
      Note: the default for SNDBUF and RCVBUF are otherwise 4096.
      7470c00d
  16. 28 Jan, 2016 1 commit
  17. 30 Nov, 2015 1 commit
  18. 18 Nov, 2015 1 commit
  19. 08 Nov, 2015 1 commit
  20. 08 Oct, 2015 1 commit
  21. 21 Aug, 2015 1 commit
  22. 16 Aug, 2015 1 commit
  23. 23 Jul, 2015 1 commit
  24. 26 Jun, 2015 1 commit
    • Jonathan Reams's avatar
      Fix units and default values for heartbeats options · e9a5bc8d
      Jonathan Reams authored
      Set the ZMQ_HEARTBEAT_TIMEOUT to default to the value of
      ZMQ_HEARTBEAT_IVL if it's not explicitly set.
      Change the units of ZMQ_HEARTBEAT_TTL to milliseconds in the API
      and round down to the nearest decisecond so that all the options
      are using the same units.
      Make the maximum heartbeat TTL match the spec (6553 seconds)
      e9a5bc8d
  25. 24 Jun, 2015 1 commit
  26. 14 Jun, 2015 1 commit
    • Jens Auer's avatar
      Fixed wrong buffer end detection in v2_decoder. · dfe19080
      Jens Auer authored
      zero-copy msg_t::init cannot be used when the message exceeds either
      the buffer end or the last received byte. To detect this, the buffer
      is now resized to the numnber of received bytes.
      dfe19080
  27. 02 Jun, 2015 1 commit
  28. 19 May, 2015 1 commit
  29. 22 Apr, 2015 1 commit
  30. 19 Feb, 2015 2 commits
  31. 18 Feb, 2015 1 commit