src/sock.h
author Tero Marttila <terom@fixme.fi>
Tue, 28 Apr 2009 20:27:45 +0300
branchnew-transport
changeset 155 c59d3eaff0fb
parent 154 f4472119de3b
child 180 22967b165692
permissions -rw-r--r--
most of the new transport/sock code compiles, but things are still missing
#ifndef SOCK_H
#define SOCK_H

/**
 * @file
 *
 * General sock_* interface.
 */
#include "error.h"
#include <sys/types.h>
#include <event2/event.h>

/**
 * Initialize the socket module's global state. Call this before calling any other sock_* functions.
 *
 * The given \a ev_base is the libevent base to use for nonblocking operation.
 *
 * @param ev_base the libevent base to use for events
 * @param err returned error info
 */
err_t sock_init (struct event_base *ev_base, error_t *err);

#endif