PHP Class ElephantIO\Engine\AbstractSocketIO

Inheritance: implements ElephantIO\EngineInterface
Afficher le fichier Open project: wisembly/elephant.io Class Usage Examples

Protected Properties

Свойство Type Description
$context Array of php stream context options
$cookies cookies received during handshake
$namespace the namespace of the next message
$options Array of options for the engine
$session Session information
$stream Resource to the connected stream
$url Parse url result

Méthodes publiques

Méthode Description
__construct ( $url, array $options = [] )
close ( ) {@inheritDoc}
connect ( ) {@inheritDoc}
emit ( $event, array $args ) {@inheritDoc}
getName ( ) {@inheritDoc}
keepAlive ( ) {@inheritDoc}
of ( $namespace ) {@inheritDoc}
read ( ) {@inheritDoc}
write ( integer $code, string $message = null ) Write the message to the socket

Méthodes protégées

Méthode Description
getDefaultOptions ( ) : array Get the defaults options
parseUrl ( $url ) : string[] Parse an url into parts we may expect

Method Details

__construct() public méthode

public __construct ( $url, array $options = [] )
$options array

close() public méthode

{@inheritDoc}
public close ( )

connect() public méthode

{@inheritDoc}
public connect ( )

emit() public méthode

{@inheritDoc}
public emit ( $event, array $args )
$args array

getDefaultOptions() protected méthode

Get the defaults options
protected getDefaultOptions ( ) : array
Résultat array mixed[] Defaults options for this engine

getName() public méthode

{@inheritDoc}
public getName ( )

keepAlive() public méthode

{@inheritDoc}
public keepAlive ( )

of() public méthode

{@inheritDoc}
public of ( $namespace )

parseUrl() protected méthode

Parse an url into parts we may expect
protected parseUrl ( $url ) : string[]
Résultat string[] information on the given URL

read() public méthode

Be careful, this method may hang your script, as we're not in a non blocking mode.
public read ( )

write() abstract public méthode

Write the message to the socket
abstract public write ( integer $code, string $message = null )
$code integer type of message (one of EngineInterface constants)
$message string Message to send, correctly formatted

Property Details

$context protected_oe property

Array of php stream context options
protected $context

$cookies protected_oe property

cookies received during handshake
protected $cookies

$namespace protected_oe property

the namespace of the next message
protected $namespace

$options protected_oe property

Array of options for the engine
protected $options

$session protected_oe property

Session information
protected $session

$stream protected_oe property

Resource to the connected stream
protected $stream

$url protected_oe property

Parse url result
protected $url