/*! \file /home/joel/workspace/ServerSocket/src/ServerSocket.h
 *  \author Stephane EKOKO <selobe@gmail.com>
 *  \version 0.1
 *
 *  \date mardi 16 novembre 2010, 13:30:18 (UTC+0100)
 *
 *
 *  \brief ServerSocket
 *
 *
 *
 */
#ifndef __SERVERSOCKET_H_
#define __SERVERSOCKET_H_
// Inclusion des entetes de librairie
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <time.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>

#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
typedef int Socket;
typedef struct sockaddr_in SockaddrInd;
typedef struct in_addr In_addr;
typedef struct hostent TheHost;
typedef struct servent TheServent;

int lgaddr = sizeof(SockaddrInd);

/*! \fn createSocket ()
 *  \author Stephane EKOKO <selobe@gmail.com>
 *  \version 0.1
 *
 *  \date mardi 16 novembre 2010, 14:36:16 (UTC+0100)
 *
 *  \param int domain
 *  \param int type
 *  \param int protocol
 *
 *  \brief 
 *  \return Socket
 *
 */

Socket createSocket(int domaine, int type, int protocol);

/*! \fn createSocketInterface (uint32_t hostlong ,int domain ,int port ,void)
 *  \author Stephane EKOKO <selobe@gmail.com>
 *  \version 0.1
 *
 *  \date mardi 16 novembre 2010, 15:13:27 (UTC+0100)
 *
 *
 *  \brief retourne l'interface du socket
 *  \return SocketaddrInd
 *
 *  \param uint32_t hostlong
 *  \param int domain
 *  \param int port
 */

SockaddrInd createSocketInterface(uint32_t h, int domain, int port);
#endif
