MediaWiki REL1_35
|
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 |
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 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 44 of file UDPTransport.php.
References $host.
UDPTransport::emit | ( | $text | ) |
string | $text |
Definition at line 81 of file UDPTransport.php.
|
static |
string | $info | In the format of "udp://host:port/prefix" |
InvalidArgumentException |
Definition at line 56 of file UDPTransport.php.
References $host.
Referenced by MediaWiki\Logger\LegacyLogger\emit().
|
private |
Definition at line 36 of file UDPTransport.php.
|
private |
Definition at line 36 of file UDPTransport.php.
Referenced by __construct(), and newFromString().
|
private |
Definition at line 36 of file UDPTransport.php.
|
private |
Definition at line 36 of file UDPTransport.php.
const UDPTransport::MAX_PAYLOAD_SIZE = 65507 |
Definition at line 35 of file UDPTransport.php.