Re: Socket takes a long time to 'finish'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Thank you! Either of the two options fixed it! My guess is that HTTP 1.0 does not need the "Connection: close" while HTTP 1.1 does. So I had to fix one of the two... I did both, just so that my script has better compatibility in the future.

Thanks again,

Alvar

At 06:59 2007/08/29, Eddie Dunckley wrote:
On Wed 29 Aug 07, Alvar Saenz-Otero wrote:
> Hello,
> I have a small but somewhat annoying issue.
> Whenever I open a socket to another server, the file is read very
> quickly, but it takes the up to 30 seconds or so to close the
> connection...
>
> Here is what I do:
>    $sever = "server.mit.edu";
>    $url = "/link";
>    $port = 80;
>    $user_agent = $_SERVER['HTTP_USER_AGENT'];
>    $server_protocol = $_SERVER['SERVER_PROTOCOL'];

just a wild guess, but try to use perhaps http1.0 instead of 1.1, and
try to add into the header that you prepare and send a
Connection: close\r\n


--
Eddie Dunckley - eddie@xxxxxxxxxx - Realtime Travel Connections
IBE Development, www.rttc.co.za, cell 083-379-6891, fax 086-617-7831
Where 33deg53'37.23"S 18deg37'57.87"E Cape Town Bellville Oakdale ZA
         "I used to have a handle on life, but it broke."

=================================================================
Alvar Saenz Otero, PhD
MIT Space Systems Laboratory
617.699.7311 cell
alvarso@xxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux