[nanomsg] Re: more updates

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Mon, 21 Apr 2014 15:24:06 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 21/04/14 00:00, Garrett D'Amore wrote:

> 2. In my implementation, I’ve decided to move away from “XSUB” vs. 
> “SUB”, etc.  Instead, after you create the socket, you can put it
> into “RAW” mode (SetOption(OptionRaw, true)).  This allows Device
> to take any socket, not just raw ones, and then put them into Raw
> mode.  As part of this, I’ve done away with the layered Raw vs.
> Cooked approach.  I found that this layering added a lot of extra
> code, for very little gain.  The few places where behavior is
> different are now just if () checks.   The old behavior of binding
> to a raw mode socket by using “X” version of the name is still
> supported for now.  (When we see an X name, if the underlying
> protocol doesn’t exist, then we try getting the “base” protocol
> (without the X), and then setting the socket into raw mode.)  I 
> would like to see that usage eradicated, but perhaps this model is 
> easier for nanomsg easiers to understand?

Interesting. What semantics for switch from full to raw mode (and vice
versa) are you using?

E.g. if there's a request sent from a REQ socket it remembers it so
that it can re-send it if the reply doesn't arrive in time. What
happens when you switch the socket to raw mode at that point? Is it
the same as closing the socket and opening a new one in raw mode (i.e.
all end-to-end state is dropped)?

Martin


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTVRv2AAoJENTpVjxCNN9YDmgIAKqMJfh9El8DnPl8NluNuKzK
5xffcBiIonuRcSfUjT2PQTKroxlPPNKLdOWIFZksp/7XCdaMATkKmT/xqWUmxYUr
s7oYAtnF48ersYVSDZo2dj7Pc2OEq9zIEw25sa/m1U4S9bAufW1xewoIhgkxWkOb
osqyZY0UgcJrTulLC2mL8K/8KL7fi0YZOgRYIJZS/my1ryDgtxatCZfdRyKBukH0
gxymZQ7EA1yrAelLt2H4OUUBT+Diph0J/l6vLiZCeEkAqS5yEKdasPzaIL1OMAmw
+LQSOHg1k6+C/bsYAhPibjUZgnkwWvFAkt9Lc5lPhh1lb3NTruYjhjrSD6Qf3pU=
=LJy5
-----END PGP SIGNATURE-----

Other related posts: