Re: Connection close in HTTP server
- From: "Alexander Nickolov" <agnickolov@xxxxxxxx>
- Date: Fri, 2 Dec 2005 10:15:57 -0800
Very simple - don't Send. Receive will tell you when the
connection is closed.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Nuno Magalhaes" <nunommagalhaes@xxxxxxxxxxx> wrote in message
news:1133534266.092059.131860@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> How do I get all the data from the server if in the last chunk the
> server closes the connection?
> I'm doing a loop that consists on a:
> Socket.Receive
> Socket.Send
> The Send function is to check if the socket is alive and the receive
> function receives the data at specified offsets. If the data arrives
> between Receive and Send functions and the connection is closed by the
> server (as described in the HTTP RFC) I can't get the last bytes of the
> html page anymore (because the socket gets dead with the send
> function).
>
> Does anyone knows a solution for this problem? Someone must have
> implemented a simple HTTP browser from the "ashes"...
>
> Thanks in advance,
> Nuno Magalhaes.
>
.
- Follow-Ups:
- Re: Connection close in HTTP server
- From: Nuno Magalhaes
- Re: Connection close in HTTP server
- References:
- Connection close in HTTP server
- From: Nuno Magalhaes
- Connection close in HTTP server
- Prev by Date: Structure MIB_IFROW
- Next by Date: Re: Wrapping TCP communications in HTTP
- Previous by thread: Connection close in HTTP server
- Next by thread: Re: Connection close in HTTP server
- Index(es):
Relevant Pages
|