Exemplo n.º 1
0
Arquivo: socket.c Projeto: alemic/h2o
static void dispose_socket(h2o_socket_t *sock, int status)
{
    if (sock->ssl != NULL) {
        SSL_free(sock->ssl->ssl);
        free(sock->ssl->input.encrypted);
        h2o_mempool_clear(&sock->ssl->output.pool);
        free(sock->ssl);
    }
    free(sock->input);

    do_dispose_socket(sock);
}
Exemplo n.º 2
0
static void dispose_socket(h2o_socket_t *sock, int status)
{
    void (*close_cb)(void *data);
    void *close_cb_data;

    if (sock->ssl != NULL)
        destroy_ssl(sock->ssl);
    h2o_buffer_dispose(&sock->input);

    close_cb = sock->on_close.cb;
    close_cb_data = sock->on_close.data;

    do_dispose_socket(sock);

    if (close_cb != NULL)
        close_cb(close_cb_data);
}
Exemplo n.º 3
0
static void dispose_socket(h2o_socket_t *sock, int status)
{
    void (*close_cb)(void *data);
    void *close_cb_data;

    if (sock->ssl != NULL) {
        destroy_ssl(sock->ssl);
        sock->ssl = NULL;
    }
    h2o_buffer_dispose(&sock->input);
    if (sock->_peername != NULL) {
        free(sock->_peername);
        sock->_peername = NULL;
    }

    close_cb = sock->on_close.cb;
    close_cb_data = sock->on_close.data;

    do_dispose_socket(sock);

    if (close_cb != NULL)
        close_cb(close_cb_data);
}