LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-26-2008, 04:23 PM   #1
vlyamtse
Member
 
Registered: Apr 2007
Posts: 54

Rep: Reputation: 15
recvfrom returns 0 question


Hello,
I am using 'recvfrom' to read from RTP media stream in streaming player app.
I see that recvfrom occasionally returns '0'. It's easy to get around the issue but I wonder what might be a cause for it in the first place... Isn't
'recvfrom' blocking call? Any ideas ?
Thanks,
-V
 
Old 11-26-2008, 05:12 PM   #2
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
The return value of zero indicates that a graceful shutdown has occurred, in relation to the blocking call question it depends on the options set for the socket.
http://www.opengroup.org/onlinepubs/.../recvfrom.html
 
Old 11-27-2008, 07:11 AM   #3
vlyamtse
Member
 
Registered: Apr 2007
Posts: 54

Original Poster
Rep: Reputation: 15
Yes, I saw man page for recvfrom... The point is: there's no logic to explicitly shutdown the socket, so I wondered why it might happen in the "midstream"...
Thank you,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Non blocking recvfrom simasimon Programming 4 11-22-2010 02:40 PM
problem with recvfrom saheelahamed Linux - Networking 1 08-28-2007 03:10 PM
recvfrom in its own thread? estratos Programming 9 02-18-2006 03:26 AM
Problem in recvfrom() live_dont_exist Programming 5 05-08-2005 04:25 PM
recvfrom() takes 20 ms to return? pingswept Programming 3 05-25-2004 03:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration