SocketClient
    
            
            in package
            
        
    
    
    
Phrity\Net\SocketClient class.
Table of Contents
Properties
- $context : mixed
- $handler : mixed
- $persistent : mixed
- $timeout : mixed
- $uri : mixed
Methods
- __construct() : mixed
- Create new socker server instance
- connect() : SocketStream
- Create a connection on remote socket.
- setContext() : SocketClient
- Set stream context.
- setPersistent() : SocketClient
- Set connection persistency.
- setTimeout() : SocketClient
- Set timeout in seconds.
Properties
$context
    protected
        mixed
    $context
     = null
    
    
    
$handler
    protected
        mixed
    $handler
    
    
    
    
$persistent
    protected
        mixed
    $persistent
     = false
    
    
    
$timeout
    protected
        mixed
    $timeout
     = null
    
    
    
$uri
    protected
        mixed
    $uri
    
    
    
    
Methods
__construct()
Create new socker server instance
    public
                    __construct(UriInterface $uri) : mixed
    Parameters
- $uri : UriInterface
- 
                    The URI to open socket on. 
connect()
Create a connection on remote socket.
    public
                    connect() : SocketStream
    Tags
Return values
SocketStream —The stream for opened conenction.
setContext()
Set stream context.
    public
                    setContext([array<string|int, mixed>|null $options = null ][, array<string|int, mixed>|null $params = null ]) : SocketClient
    Parameters
- $options : array<string|int, mixed>|null = null
- $params : array<string|int, mixed>|null = null
Return values
SocketClientsetPersistent()
Set connection persistency.
    public
                    setPersistent(bool $persistent) : SocketClient
    Parameters
- $persistent : bool
Return values
SocketClientsetTimeout()
Set timeout in seconds.
    public
                    setTimeout(int|null $timeout) : SocketClient
    Parameters
- $timeout : int|null