Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Sending HTML page with a socket

Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2003, 02:56 PM
Default Sending HTML page with a socket



Hi All,

Here is my problem :
I try to send an HTML page with a socket.
I do the following :

1 listen
2 accept
3 send

until now I can see the page on the browser. But if I do a close(socket),
the page disappears on the browser window. What should I do to close the
socket and still have my page on the browser ?
I tried with sendto(), write() but got the same result.
Maybe there is a better way to do this...

THX for your help.






Farid Benzakour
Reply With Quote
  #2  
Old 12-11-2003, 05:07 PM
Phil Frisbie, Jr.
Guest
 
Posts: n/a
Default Re: Sending HTML page with a socket

Farid Benzakour wrote:

> Hi All,
>
> Here is my problem :
> I try to send an HTML page with a socket.
> I do the following :
>
> 1 listen
> 2 accept
> 3 send
>
> until now I can see the page on the browser. But if I do a close(socket),
> the page disappears on the browser window. What should I do to close the
> socket and still have my page on the browser ?
> I tried with sendto(), write() but got the same result.
> Maybe there is a better way to do this...


What does your response header look like? It sounds like you are not following
the HTTP spec well enough.

> THX for your help.


--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

Reply With Quote
Reply

Tags
html, page, sending, socket

Thread Tools
Display Modes

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
Forum Jump


All times are GMT. The time now is 06:52 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.