77 public function emit( $text ) {
79 if ( $this->prefix !==
false ) {
80 $text = preg_replace(
'/^/m', $this->prefix .
' ', $text );
83 if ( strlen( $text ) > 65506 ) {
84 $text = substr( $text, 0, 65506 );
87 if ( substr( $text, -1 ) !=
"\n" ) {
90 } elseif ( strlen( $text ) > 65507 ) {
91 $text = substr( $text, 0, 65507 );
94 $sock = socket_create( $this->domain, SOCK_DGRAM, SOL_UDP );
99 socket_sendto( $sock, $text, strlen( $text ), 0, $this->host, $this->
port );
100 socket_close( $sock );