1. 24 Jan, 2014 2 commits
  2. 23 Jan, 2014 2 commits
  3. 22 Jan, 2014 2 commits
  4. 21 Jan, 2014 6 commits
  5. 20 Jan, 2014 10 commits
  6. 19 Jan, 2014 7 commits
  7. 18 Jan, 2014 5 commits
  8. 17 Jan, 2014 4 commits
    • Tim M's avatar
      fixed define value in header · f13512a9
      Tim M authored
      f13512a9
    • Tim M's avatar
      Both STREAM and ROUTER sockets suffer from a naming problem on outbound… · 5d4860ea
      Tim M authored
      Both STREAM and ROUTER sockets suffer from a naming problem on outbound connections. While these connections can be created, they can't be immediately used. Traffic must be received before it can be sent. This prevents practical, minimal usage of STREAM or ROUTER as a true N fan in/out socket.
      
      This change simply provides the user with a socket option that sets a user defined name of the next outbound connection:
      
      zmq_setsockopt(routerSock,ZMQ_NEXT_IDENTITY,"myname",6);
      if(0 > zmq_connect(routerSock,"tcp://127.0.0.1:1234")) return 1;
      ret = zmq_send(routerSock,"myname",6,ZMQ_SNDMORE);
      zmq_send(routerSock,b.mem,b.used,0);
      
      In this example, the socket is immediately given the name "myname", and is capable of immediately sending traffic.
      
      This approach is more effective in three ways:
      1) It prevents all sorts of malicious peer naming attacks that can cause undefined behavior in existing ROUTER connections. (Two connections are made that both transmit the same name to the ROUTER, the ROUTER behavior is undefined)
      2) It allows immediate control of connections made to external parties for STREAM sockets. Something that is not possible right now. Before an outbound connection had no name for STREAM or ROUTER sockets because outbound connections cannot be sent to without first receiving traffic.
      3) It is simpler and more general than expecting two ROUTER sockets to handshake on assigned connection names. Plus it allows inline sending to new connections on ROUTER.
      5d4860ea
    • Goswin von Brederlow's avatar
      Add STREAM connect notification. · afb24b53
      Goswin von Brederlow authored
      Adjust test cases to connection notification.
      Increase error checking in test cases.
      afb24b53
    • Goswin von Brederlow's avatar
      Store socket FD after connect · 92f8f244
      Goswin von Brederlow authored
      92f8f244
  9. 16 Jan, 2014 2 commits