/*********************************************************************
*                                                                    *          
*                              FLY                                   *
*                           --E#Y#E--				     *
*                         (==MUSCLE==)                               *
*                                                                    *
*********************************************************************/
/* tcpnetwork.h */
#ifndef NETWORK_H_
#define NETWORK_H_

/* Header Files */
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>

/* Define Files */
#define socket_t int

/*---------------------------------------------------------------------------*/

/* Function */
void error_exit( char *error_message );
void net_create( int af, int type, int protocol );
void net_bind( socket_t *tcpsock, unsigned long adress, const unsigned short port );
void net_listen( socket_t *tcpsock );
void net_accept( socket_t *new_socket, socket_t *socket );
void net_connect(socket_t *tcpsock, char *serv_addr, const unsigned short port );
void net_send( socket_t *tcpsock, char *data, size_t size );
void net_recv( socket_t *tcpsock, char *data, size_t size );
void net_close( socket_t *tcpsock );


/*---------------------------------------------------------------------------*/

#endif

