CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Server-push technology ... ?


New User

Mar 8, 2003, 12:32 PM

Post #1 of 3 (1161 views)
Server-push technology ... ? Can't Post

Hi to everybody !!!

Sorry ... need your help !!! I write a Chat now and the messages update is based on " META HTTP-EQUIV="refresh ". I saw couple chats using "server-push" technology to display new messages and that looks good. It's not good method if a visitor uses Proxy ... client-pull is better in this case. But still I want to have 2 options to choose ... I was searching the Web for more info about this method ... found some examples ... tried them ... doesn't work ... Please, if someone know how to use server-pull method to display new messages - explain to me !!! Really need it !!!

Thank you a lot in advance !!!


(This post was edited by Woodoo on Mar 9, 2003, 7:39 AM)

New User

Mar 9, 2003, 8:24 AM

Post #2 of 3 (1151 views)
Re: [Woodoo] Server-push technology ... ? [In reply to] Can't Post

Well ... thanx anywy ... I've found coiple resources on the Net ... if someone needs, take a look here:

Take care !!!

New User

May 27, 2003, 11:18 AM

Post #3 of 3 (1122 views)
Re: [Woodoo] Server-push technology ... ? [In reply to] Can't Post

Hi !!! It's me again ...

Well ... I've found some articles ... read them ... tried to programm the simple script and faced to one problem ... data buffering and STDIO strem flushing ...

So, here is an example how it is possible to display some lines (messages) every second ...


$Marker =
$Spacer =
" \n" x 300;


"Content-type: ",


"<META HTTP-EQUIV=\"Content-type\" CONTENT=\"text/html;\">\n\n",
"<body bgcolor=ffffff>\n",


print "$Spacer\n";

# wait a little bit


# end of script

So, that works fine when $Spacer = " \n" x 300; and if to look in HTML code of the Output page you will see a lot of spaces between the lines (300 times \n from line to line). Operator $|=1; has to cancel buffering but looks like it doesn't work. For a data transfer it is required certain amount of bits to send to the Client ... if you define $Spacer = " \n" x 10; or so then that will be no outprinting messages every second but all in once after several seconds when the required amount of bits is reached ... and that is sucks !!! I want to modify a chat script to support server-push technology - that saves your eyes, time and trafic ... and was trying to find some info on how to do it ... found ... tested ... and nothing works ... well ... maybe works for Netscape (as it is mentioned in many articles) but doesn't work for my IE. I saw several chats with this method working fine with IE !!! ... So, please, if someone has ideas what and how to do this stuff - share !!!

Thank you very much in advance !!!



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives