[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] read() blokerer



David List <sslug@sslug> writes:

> Jeg er ved at skrive noget C++, som handler om i første omgang at hente en 
> HTTP request fra en socket som har en regulær browser i den anden ende.
> 
> Der er et problem med at få hentet den HTTP request, browseren kommer med, 
> helt "ind". Jeg har først prøvet med den std::ifstream constructor der 
> findes endnu i g++ 2.95, som tager et filedescriptor argument, og det 
> virker nogenlunde. Jeg kan blot ikke få endt indhentningen af request. Da 
> denne non-standard constructor åbenbart er deprecated i g++ 3.x, har jeg da 
> også opgivet at bruge den, og anvender read() nu istedet. Så sker der 
> *slet* ikke noget.
> 
> Jeg kan ikke entydigt få placeret problemet ud fra forsøg med debugging 
> messages i koden. Hvad er det mon der generer mig: buffering eller blocking?

[snip kode]

Hvad nu hvis det request som der bliver sendt er kortere end 256
bytes? Så vil du vente på mere, og klienten tror den er færdig og
venter på dit svar...

-- 
Christian Hemmingsen


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *