Overview  Package  Tree HessianPHP

HessianPHP.Http

Class SocketHttpConnection

HessianPHP.Http.HttpConnection
|
+--HessianPHP.Http.SocketHttpConnection

class SocketHttpConnection
extends HttpConnection

This class stablishes communication to a remote Http URL using sockets and raw data transmission

Author:
Manolo Gómez
Version:
1.0

Field Summary
private var$__socket
Fields inherited from HessianPHP.Http.HttpConnection
$url $urlInfo $options $headers $responseHeaders $code $message $httpVersion $error $length
Method Summary
public stringPOST

Sends an HTTP request using the POST method

public voidopen

Opens a socket connection to a remote host

protected voidclose
protected voidwrite
protected voidparseHeaders

Parses incoming header information and checks for repeated headers

public stringread

Read the reply from the socket, parses incoming headers and returns the content

Methods inherited from HessianPHP.Http.HttpConnection
HttpConnection, initUrl, addHeader, hasError, POST
Field Detail

__socket

private var $__socket
Method Detail

POST()

public string POST(string data)

Sends an HTTP request using the POST method

Parameters:
data - Content to be sent
Returns:
Response from remote server

open()

public void open(string host,
                 int port)

Opens a socket connection to a remote host

Parameters:
host - Remote host
port - Remote port

close()

protected void close()

write()

protected void write(var $data)
Parameters:
$data

parseHeaders()

protected void parseHeaders(string head = '')

Parses incoming header information and checks for repeated headers

Parameters:
head - first line of HTTP headers

read()

public string read()

Read the reply from the socket, parses incoming headers and returns the content

Returns:
body content of the response

Overview  Package  Tree HessianPHP