src/sock.c
author Tero Marttila <terom@fixme.fi>
Sun, 22 Feb 2009 05:27:29 +0200
changeset 2 a834f0559939
parent 1 cf0e1bb6bcab
child 3 cc94ae754e2a
permissions -rw-r--r--
working SSL using gnutls - a bit of a painful process

#include "sock_internal.h"
#include "sock_gnutls.h"

void sock_init (void)
{
    // XXX: just call directly for now
    sock_gnutls_init();
}

int sock_stream_read (struct sock_stream *sock, void *buf, size_t len)
{
    // proxy off to method handler
    return sock->type->methods.read(sock, buf, len);
}

int sock_stream_write (struct sock_stream *sock, const void *buf, size_t len)
{
    // proxy off to method handler
    return sock->type->methods.write(sock, buf, len);
}