PHP 클래스 LdapTools\Utilities\TcpSocket

저자: Chad Sikorra ([email protected])
파일 보기 프로젝트 열기: ldaptools/ldaptools 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$options array
$socket boolean | resource

공개 메소드들

메소드 설명
__construct ( array $options = [] )
close ( ) Close the connection to the host.
connect ( string $host, integer $port, integer $timeout = 1 ) : boolean Connect to the host on the port defined for this TCP socket.
enableEncryption ( integer $cryptoMethod = null ) : boolean Enable encryption for the socket connection.
getParams ( ) : array Get parameter/option information from the TCP socket stream/context.
read ( integer $length ) Read data from the TCP socket.
setOperationTimeout ( integer $timeout ) : boolean Sets the timeout (in seconds) for TCP operations (not the initial connection attempt).
write ( mixed $data ) : integer Write data to the TCP socket.

메소드 상세

__construct() 공개 메소드

public __construct ( array $options = [] )
$options array The TCP stream context options.

close() 공개 메소드

Close the connection to the host.
public close ( )

connect() 공개 메소드

Connect to the host on the port defined for this TCP socket.
public connect ( string $host, integer $port, integer $timeout = 1 ) : boolean
$host string
$port integer
$timeout integer
리턴 boolean

enableEncryption() 공개 메소드

Enable encryption for the socket connection.
public enableEncryption ( integer $cryptoMethod = null ) : boolean
$cryptoMethod integer
리턴 boolean

getParams() 공개 메소드

Get parameter/option information from the TCP socket stream/context.
public getParams ( ) : array
리턴 array

read() 공개 메소드

Read data from the TCP socket.
public read ( integer $length )
$length integer

setOperationTimeout() 공개 메소드

Sets the timeout (in seconds) for TCP operations (not the initial connection attempt).
public setOperationTimeout ( integer $timeout ) : boolean
$timeout integer
리턴 boolean

write() 공개 메소드

Write data to the TCP socket.
public write ( mixed $data ) : integer
$data mixed
리턴 integer

프로퍼티 상세

$options 보호되어 있는 프로퍼티

protected array $options
리턴 array

$socket 보호되어 있는 프로퍼티

protected bool|resource $socket
리턴 boolean | resource