0

How can I change the socket priority by using

int setsockopt(int sockfd, int level, int optname,const void *optval, socklen_t optlen); 

and also help me to understand what is the use of const void *optval.

Bala
  • 1
  • 1
  • What part of the documentation didn't you understand? – user207421 Apr 06 '18 at 05:40
  • what is the difference between optval = 0 and optval =6 – Bala Apr 06 '18 at 05:48
  • what i understand is based on the optval the priority of the socket is changed while using SO_PRIORITY flag. – Bala Apr 06 '18 at 05:50
  • Possible duplicate of [What is the effect of setting a linux socket - high priority?](https://stackoverflow.com/questions/37998404/what-is-the-effect-of-setting-a-linux-socket-high-priority) – t.niese Apr 06 '18 at 05:55
  • I read that also their he mentiond int optval=7 // valid values are in the range [1,7] // 1- low priority, 7 - high priority // but low number gets high priority right..? – Bala Apr 06 '18 at 06:14
  • In my case im having 3 sockets (flag i used is SO_PRIORITY) for first socket i set optval=1 , second socket optval=4, and for socket thride one i set optval = 6. can you please explain what will happen for each case – Bala Apr 06 '18 at 06:19

0 Answers0