The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
c system call rangaswamy High Level Programming 1 02-19-2008 10:53 AM
read files from folder and then call another script girishnn UNIX and Linux Applications 1 11-08-2007 06:52 PM
read files from folder and then call another script girishnn Shell Programming and Scripting 3 11-06-2007 03:53 PM
how to differentiate system call from library call muru UNIX for Advanced & Expert Users 2 07-19-2007 08:20 PM
system() function call... Vishnu High Level Programming 1 10-15-2002 08:36 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-16-2002
Registered User
 

Join Date: Nov 2002
Posts: 3
read system call

When i read 4 bytes from a socket the read function returns 0 value. what does it mean?
How should i know whether a message is available in the socket or not?
__________________
Madhu
Reply With Quote
Forum Sponsor
  #2  
Old 11-16-2002
Registered User
 

Join Date: Jul 2002
Location: void
Posts: 53
>When i read 4 bytes from a socket the read function returns 0 value. what does it mean?
Read man pages on read(), the return value section. The return value of read() would be zero, stressing there were no bytes read on that stream.

>How should i know whether a message is available in the socket or not?
You could use select() or poll(), the choice is yours.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0