Asyncore
|
Public Member Functions | |
__construct (array $streams=[]) | |
__destruct () | |
onClient (callable $client_handler) | |
Static Public Member Functions | |
static | createStream (string $address, $public_key_file=null, $private_key_file=null) |
Public Attributes | |
$streams | |
$handshaking_clients = [] | |
$client_handler | |
Asyncore\Server::__construct | ( | array | $streams = [] | ) |
array<resource> | $streams The streams the server listens for new connections on. |
Asyncore\Server::__destruct | ( | ) |
|
static |
Creates a stream for a server to listen for new connections on.
string | $address | e.g. "0.0.0.0:80" |
string | null | $public_key_file | Path to the file containing your PEM-encoded public key or null if you don't want encryption |
string | null | $private_key_file | Path to the file containing your PEM-encoded private key or null if you don't want encryption |
Exception |
Asyncore\Server::onClient | ( | callable | $client_handler | ) |
Sets the function to be called when a client has connected and finished the TLS handshake, if applicable.
callable | $client_handler |
callable Asyncore\Server::$client_handler |
array Asyncore\Server::$handshaking_clients = [] |
Contains clients that are still pending the TLS handshake.
array< resource > Asyncore\Server::$streams |
The streams the server listens for new connections on.