private $event_errors = array(
                        'EVBUFFER_READ' => 1,
                        'EVBUFFER_WRITE' => 2,
                        'EVBUFFER_EOF' => 16,
                        'EVBUFFER_ERROR' => 32,
                        'EVBUFFER_TIMEOUT' => 64
                );
                private function handler_error_event($client, $error_ids, $params) {
                        $error = array();
                        foreach ($this->event_errors as $error_type => $error_code) {
                                if ($error_ids & $error_code) {
                                        array_push($error, $error_type);
                                }
                        }
                        echo 'error event #'.$error_ids.' '.join(' | ', $error)."\n";
                }