#define NETWORK_H
/* includes */
+#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <string.h>
} t_connection;
typedef struct s_net {
+ int outfd;
int l_fd; /* fd for tcp conn */
int l_udp_fd; /* fd for udp data receive */
int s_udp_fd; /* fd for udp data send */
} t_net;
/* function prototypes */
-int network_init(t_net *net);
+int network_init(t_net *net,int outfd);
+int network_listen(t_net *net);
int network_shutdown(t_net *net);
int network_set_listen_port(t_net *net,in_port_t port);
int network_manage_connection(t_net *net);