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