From: hackbard Date: Fri, 5 Nov 2004 14:48:42 +0000 (+0000) Subject: downgraded network api again X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=011ee842011c244cda437657f76853888f0bfd17;p=my-code%2Fapi.git downgraded network api again --- diff --git a/network/network.c b/network/network.c index c8022e5..1cdd38c 100644 --- a/network/network.c +++ b/network/network.c @@ -18,23 +18,6 @@ int network_init(t_net *net,int outfd) { return N_SUCCESS; } -int network_set_timeout_chan(t_net *net,int chan,int read,int write) { - - struct timeval to; - socklen_t len; - - len=sizeof(struct timeval); - - to.tv_usec=0; - - to.tv_sec=read; - setsockopt(net->connection[chan].fd,SOL_SOCKET,SO_RCVTIMEO,&to,len); - to.tv_sec=write; - setsockopt(net->connection[chan].fd,SOL_SOCKET,SO_SNDTIMEO,&to,len); - - return N_SUCCESS; -} - int network_listen(t_net *net) { struct sockaddr_in addr; diff --git a/network/network.h b/network/network.h index 7ef6301..4f5e87e 100644 --- a/network/network.h +++ b/network/network.h @@ -69,7 +69,6 @@ typedef struct s_net { /* function prototypes */ int network_init(t_net *net,int outfd); -int network_set_timeout(t_net *net,int chan,int read,int write); int network_listen(t_net *net); int network_shutdown(t_net *net); int network_set_listen_port(t_net *net,in_port_t port);