question on TCP_NODELAY

Hello All,

I have question on TCP_NODELAY setsockopt in case of server. At what point do we need to set this socket option to take effect?. Is it after calling socket system call or after accept system call?

Ex:

int flag = 1;
int result = setsockopt(sock,IPPROTO_TCP,TCP_NODELAY, &flag,sizeof(int));

whether sock should be socket fd or fd obtained after accept?

Or will they have no difference irrespective of where you set the option?

Thanks in advance
Nandakumar
Topic archived. No new replies allowed.