src/sock.c
author Tero Marttila <terom@fixme.fi>
Wed, 20 May 2009 22:52:01 +0300
changeset 202 210c43e6c088
parent 180 22967b165692
permissions -rw-r--r--
slight tweaks to nexus_lua, use error_t and no need to pop the loaded chunk ourselv - lua_pcall will always do that

#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;
}