X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=src%2Fnetwork.h;h=14168bfb2d835b69cd11d3dbc06c4f8930adf93d;hb=c799218d9fee714d9934b499b0b24fd75535c312;hp=31ca335148e9237a2b3eaf62980528b15ce73908;hpb=9c1916712be5882b728b5e54e6716272ce0678a5;p=my-code%2Fivac.git diff --git a/src/network.h b/src/network.h index 31ca335..14168bf 100644 --- a/src/network.h +++ b/src/network.h @@ -29,6 +29,13 @@ #define N_SUCCESS 1 #define N_ERROR -1 +#define N_E_IN_USE -2 +#define N_E_NO_INFO -3 +#define N_E_CLOSE -4 +#define N_E_CONNECT -5 +#define N_E_NC -6 +#define N_E_ACCEPT -7 +#define N_E_MAXC -8 #define MAX_LISTEN_QUEUE 32 @@ -56,6 +63,11 @@ int network_init(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); +int network_connect(t_net *net,int channel); +int network_close(t_net *net,int channel); +int network_set_connection_info(t_net *net,int channel,char *ip,int port); +int network_select(t_net *net,int channel); +int network_deselect(t_net *net,int channel); int network_manage_incoming(t_net *net); int network_send(int fd,unsigned char *data,int datasize); int network_receive(int fd,unsigned char *data,int datasize);