MediaWiki REL1_33
|
A generic class to send a message over UDP. More...
Public Member Functions | |
__construct ( $host, $port, $domain, $prefix=false) | |
emit ( $text) | |
Static Public Member Functions | |
static | newFromString ( $info) |
Private Attributes | |
$domain | |
$host | |
$port | |
$prefix | |
A generic class to send a message over UDP.
If a message prefix is provided to the constructor or via UDPTransport::newFromString(), the payload of the UDP datagrams emitted will be formatted with the prefix and a single space at the start of each line. This is the payload format expected by the udp2log service.
Definition at line 31 of file UDPTransport.php.
UDPTransport::__construct | ( | $host, | |
$port, | |||
$domain, | |||
$prefix = false |
|||
) |
string | $host | IP address to send to |
int | $port | port number |
int | $domain | AF_INET or AF_INET6 constant |
string | bool | $prefix | Prefix to use, false for no prefix |
Definition at line 40 of file UDPTransport.php.
UDPTransport::emit | ( | $text | ) |
|
static |
string | $info | In the format of "udp://host:port/prefix" |
InvalidArgumentException |
Definition at line 52 of file UDPTransport.php.
References $host.
Referenced by MediaWiki\Logger\LegacyLogger\emit().
|
private |
Definition at line 32 of file UDPTransport.php.
|
private |
Definition at line 32 of file UDPTransport.php.
Referenced by __construct(), and newFromString().
|
private |
Definition at line 32 of file UDPTransport.php.
|
private |
Definition at line 32 of file UDPTransport.php.