src/sock.c
author Tero Marttila <terom@fixme.fi>
Thu, 21 May 2009 16:23:50 +0300
branchlua-threads
changeset 207 3fa22abb5421
parent 180 22967b165692
permissions -rw-r--r--
fix lua_nexus_sleep to use EV_TIMEOUT + misc

#include "sock_internal.h"
#include "ssl_internal.h"

#include <assert.h>

// global sock_stream_ctx instance
struct sock_stream_ctx _sock_stream_ctx;

err_t sock_init (struct event_base *ev_base, struct error_info *err)
{
    // store ev_base
    _sock_stream_ctx.ev_base = ev_base;

    // XXX: just call these all directly for now
    if (ssl_global_init(err))
        return ERROR_CODE(err);

    // done
    return SUCCESS;
}