Lines Matching refs:socket
111 // open socket
112 $socket = @ fsockopen($server, $port, $errno, $errstr, $this->timeout);
113 if (!$socket) {
119 stream_set_blocking($socket, 0);
131 fputs($socket, $request);
132 // read headers from socket
140 if (feof($socket)) {
141 $this->error = 'Premature End of File (socket)';
144 $r_headers .= fread($socket, 1); #FIXME read full lines here?
210 if (feof($socket)) {
211 $this->error = 'Premature End of File (socket)';
219 $byte = fread($socket, 1);
223 $byte = fread($socket, 1); // readtrailing \n
225 $this_chunk = fread($socket, $chunk_size);
228 $byte = fread($socket, 2); // read trailing \r\n
242 // read entire socket
243 while (!feof($socket)) {
249 $r_body .= fread($socket, 4096);
261 // close socket
262 $status = socket_get_status($socket);
263 fclose($socket);