Method | Description | |
---|---|---|
__construct ( SimpleUrl $url ) | Sets the target URL. | |
createConnection ( string $method, integer $timeout ) : SimpleSocket | Opens a socket to the route. | |
getUrl ( ) : SimpleUrl | Resource name. |
Method | Description | |
---|---|---|
createSocket ( string $scheme, string $host, integer $port, integer $timeout ) : SimpleSocket/SimpleSecureSocket | Factory for socket. | |
getHostLine ( ) : string | Creates the host part of the request. | |
getRequestLine ( string $method ) : string | Creates the first line which is the actual request. |
public __construct ( SimpleUrl $url ) | ||
$url | SimpleUrl | URL as object. |
public createConnection ( string $method, integer $timeout ) : SimpleSocket | ||
$method | string | HTTP request method, usually GET. |
$timeout | integer | Connection timeout. |
return | SimpleSocket | New socket. |
protected getHostLine ( ) : string | ||
return | string | Host line content. |
protected getRequestLine ( string $method ) : string | ||
$method | string | HTTP request method, usually GET. |
return | string | Request line content. |