Add a simple SNDPRIO implemention on req0#1743
Conversation
add SNDPRIO option
add SNDPRO on req0
| if (nni_pipe_peer(p->pipe) != NNG_REQ0_PEER) { | ||
| return (NNG_EPROTO); | ||
| } | ||
|
|
There was a problem hiding this comment.
This option should be a generic option, not just on dialers, but on end points, and then configured on the pipe by the end point.
I also think that we should expand this to RECV priority as well, so that we can use the same option for REP to give preference to some peers. I would like to think on this a bit.
There was a problem hiding this comment.
Hi, in the nanomsg code, I find the ep option when I call the nn_connect function, and then copy the socket option(ep_template) to pipe .
But in the nng code, I can't find the ep . Are the dialer and listener eps? If so, I will add option on the listener also or only add option on the socket, and then copy this option to dialer or listener on creating them.
There was a problem hiding this comment.
I have added SNDPRIO to listener also.
|
Ok, I will study howto correct this on end points. |
fixes #104 Need RCVPRIO and SNDPRIO options
I have added a very simple implemention on req0 to solve my connected two rep server. would you like to merge this into your master?
I add the NNG_OPT_SNDPRIO on the dialer, then copy the sndpri to the nni_pipe on req0_pipe_start function. then resort the ready_pipes.
Maybe you can provide better implementation methods. thanks!