|
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 | |
| $domain | |
| $port | |
| $prefix | |
Private Attributes | |
| $host | |
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 |
|||
| ) |
| UDPTransport::emit | ( | $text | ) |
|
static |
| string | $info | In the format of "udp://host:port/prefix" |
| InvalidArgumentException |
Definition at line 52 of file UDPTransport.php.
References $domain, $host, $port, $prefix, and IP\isIPv4().
Referenced by MediaWiki\Logger\LegacyLogger\emit(), and UDPRCFeedEngine\send().
| UDPTransport::$domain |
Definition at line 32 of file UDPTransport.php.
Referenced by __construct(), and newFromString().
|
private |
Definition at line 32 of file UDPTransport.php.
Referenced by __construct(), and newFromString().
| UDPTransport::$port |
Definition at line 32 of file UDPTransport.php.
Referenced by __construct(), and newFromString().
| UDPTransport::$prefix |
Definition at line 32 of file UDPTransport.php.
Referenced by __construct(), and newFromString().