-
-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a simple SNDPRIO implemention on req0 #1743
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!