MediaWiki master
|
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) |
Public Attributes | |
const | MAX_PAYLOAD_SIZE = 65507 |
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 33 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 48 of file UDPTransport.php.
UDPTransport::emit | ( | $text | ) |
string | $text |
Definition at line 84 of file UDPTransport.php.
|
static |
string | $info | In the format of "udp://host:port/prefix" |
Definition at line 59 of file UDPTransport.php.
Referenced by MediaWiki\Logger\LegacyLogger\emit().
const UDPTransport::MAX_PAYLOAD_SIZE = 65507 |
Definition at line 35 of file UDPTransport.php.