The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
reading data from .ini file vinna Shell Programming and Scripting 2 06-02-2008 11:44 AM
unable Insert data from .dat file to .xls can anybody help me kreddy2003 Shell Programming and Scripting 1 05-28-2008 05:33 AM
HTTP Keep-Alive socket problem imdupeng High Level Programming 0 03-29-2008 09:11 PM
Using loop reading a file,retrieving data from data base. Sonu4lov Shell Programming and Scripting 1 01-19-2007 03:38 AM
Reading in data sets into arrays from an input file. sidamin810 Shell Programming and Scripting 5 07-06-2005 07:54 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-05-2008
Harish.joshi Harish.joshi is offline
Registered User
  
 

Join Date: Oct 2008
Location: New Delhi, India
Posts: 3
Smile unable to get end of file while reading HTTP data from socket

I am trying to read HTTP data from a socket. However, for the final set of data being read using read(), read blocks and the control doesnt come back for further processing. I tried using select, but it didn't work...
Any help would be greatly acknowledged.
  #2 (permalink)  
Old 10-06-2008
calv calv is offline
Registered User
  
 

Join Date: Sep 2008
Location: Germany
Posts: 26
The HTTP Protocol is designed to always send the size of the data in the "Content-Length:" field. You must count the bytes you read after the "\r\n\r\n", so you exactly stop, when there is nothing more to receive.
  #3 (permalink)  
Old 10-08-2008
Harish.joshi Harish.joshi is offline
Registered User
  
 

Join Date: Oct 2008
Location: New Delhi, India
Posts: 3
Quote:
Originally Posted by calv View Post
The HTTP Protocol is designed to always send the size of the data in the "Content-Length:" field. You must count the bytes you read after the "\r\n\r\n", so you exactly stop, when there is nothing more to receive.

Thanx for all your help, I got the problem fixed I wasn't deploying the select functions properly... Thnx again for ur effort
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0