


/*
 * lib.c:
 *
 * Copyright (c) 2000 James McKenzie <james@fishsoup.dhs.org>.
 * All rights reserved.
 *
 * $Log: lib.c,v $
 * Revision 1.3  2000/02/21 04:11:26  root
 * #
 *
 * Revision 1.2  2000/02/21 04:01:01  root
 * #
 *
 * Revision 1.1  2000/02/21 02:53:46  root
 * #
 *
 *
 */

static char rcsid[] = "$Id: lib.c,v 1.3 2000/02/21 04:11:26 root Exp $";


#include "hifimsg.h"
#include "hifimsg_private.h"

void *
hifimsg_open (void)
{
  Connexion c;

  c = hifimsg_udp_open ();

  return (void *) c;
}

int
hifimsg_fd (void *_c)
{
  Connexion c = (Connexion) _c;

  return c->fd;
}


int
hifimsg_send (void *_c, void *buf, int len)
{
  Connexion c = (Connexion) _c;

  return (c->send) (c->h, buf, len);
}

int
hifimsg_recv (void *_c, void *buf, int len)
{
  Connexion c = (Connexion) _c;

  return (c->recv) (c->h, buf, len);
}

void
hifimsg_close (void *_c)
{
  Connexion c = (Connexion) _c;

  (c->close) (c->h);
  free (c);

}
