-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/03/14 10:54, Paul Colomiets wrote: > Hi Martin, > > On Tue, Mar 11, 2014 at 10:46 AM, Martin Sustrik > <sustrik@xxxxxxxxxx> wrote: >>> I don't think such prioritization is useful enough to create >>> another feature. I think the obvious way to implement it is to >>> use two sockets. (Note that you need to have two different >>> nn_bind() calls to use priorities too, because nanomsg doesn't >>> allow to have any distinction between two accept()'ed >>> connections on single endpoint). >> >> Doesn't the same apply to send priorities? >> > No. Because you don't know if there are peers at socket A (i.e. > nanomsg doesn't expose that information), to know when to fallback > to socket B. Still sounds the same to me: Scenario A (simulating send priorities using 2 sockets): 1. Open 2 sockets 2. Send message to first socket in a non-blocking way 3. In case of EAGAIN error send the message to the second socket. Scenario B (simulating recv priorities using 2 sockets): 1. Open 2 sockets 2. Rec message from first socket in a non-blocking way 3. In case of EAGAIN error receive the message from the second socket. Comment: In reality both scenarious would require to poll on both sockets. Above version is simplified for readability sake. Martin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTHuZAAAoJENTpVjxCNN9YYOIH/3mISlLPFbz3iJtGyYGKBECm ZNPxJiPqBu27wzL3eCUQVD8itRMYeY2cHItlupClzxGHX3fo20br1PslCopL00Cy w8Bwk1ILxn1YgNhpCQZFFM+spaZxe3l7iJ5g3Imhl6DSb70RH3wEJfqtOF5vxhyw h6g3bpoCvCzWV60BEe2jffRZ9AoaRdXnCR2SLE5/rGa0y31a0r9stRiuUw0yChtW 1OKhggkY+B4eCyk8TspXdczzr5w9wVu6bGBe+RNPiSEz2/Nr9RIZS/bKjG2d5hl8 StWHIH9yX5yn+kwJed2GzbhbgUNY89q6yKAppHZfKozt1uPADsLfnhm3GmOnROc= =jIPj -----END PGP SIGNATURE-----