con_ws_events(agooCon c) {
    short	events = 0;
    agooRes	res = agoo_con_res_peek(c);

    if (NULL != res && (res->close || res->ping || NULL != res->message)) {
	events = POLLIN | POLLOUT;
    } else if (!c->closing) {
	events = POLLIN;
    }
    return events;
}
con_ws_events(agooCon c) {
    short	events = 0;
    agooRes	res = agoo_con_res_peek(c);

    if (NULL != res && (res->close || res->ping || NULL != res->message)) {
	events = POLLIN | POLLOUT;
    } else if (!c->closing) {
	events = POLLIN;
    }
    return events;
}