Re: Socket takes a long time to 'finish'

From: Date: Wed, 29 Aug 2007 10:59:01 +0000
Subject: Re: Socket takes a long time to 'finish'
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261443@lists.php.net to get a copy of this message
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@rttc.co.za - 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."

« previous php.general (#261443) next »