Is SO_SNDTIMEO valid for small time intervals under kernel 2.4?


I continuously sent 1.5K udp packet over 1Gbps interface using blocking i/o. I also set  SO_SNDTIMEO as 50us and measured the time before and after writev().

it seems so_sndtimeo does not work, and i constantly got 300us delay (due to the busy sendind loop...)

any insight is highly appreciated...
adairwuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ravenplCommented:
50us is 50 microseconds? 50/1000000 fraction of second (right?)
Considering that linux clock is ticking 100 per second (1000 times in kernel 2.6 - but confugureable) the resolution You should expect is 1ms (milisecond)...
same applies to usleep()
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leisnerCommented:
this is interesting...

http://www.developerweb.net/forum/archive/index.php/t-3439.html

I definitely recall strange experiences with this years ago...

Rich Stevens didn't mention it in his books, his a response he wrote in google groups:
       
From:            W. Richard Stevens - view profile
Date:            Fri, Mar 21 1997 12:00 am
Email:             rstev...@noao.edu (W. Richard Stevens)
Groups:             comp.unix.solaris
Not yet rated
Rating:       
show options

Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse | Find messages by this author

> Does anyone know what type of argument setsockopt expects when you set
> SO_SNDTIMEO/SO_RCVTIMEO? The man pages make no mention of these. The two
> options I have seen in other OS's are struct timeval or an integer.

A pointer to a struct timeval.  But I don't think Solaris implements
these socket options.  Just because the SO_xxx constant is defined in
a header does not mean it's implemented ...

        Rich Stevens
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux OS Dev

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.