|
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 19 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 34 of file UDPTransport.php.
| UDPTransport::emit | ( | $text | ) |
| string | $text |
Definition at line 70 of file UDPTransport.php.
|
static |
| string | $info | In the format of "udp://host:port/prefix" |
Definition at line 45 of file UDPTransport.php.
Referenced by Wikimedia\Stats\Emitters\UDPEmitter\__construct().
| const UDPTransport::MAX_PAYLOAD_SIZE = 65507 |
Definition at line 21 of file UDPTransport.php.
Referenced by Wikimedia\Stats\Emitters\UDPEmitter\__construct().