outfd fix
[my-code/api.git] / network / network.c
index c8022e5..dc5164b 100644 (file)
@@ -8,7 +8,7 @@
 
 int network_init(t_net *net,int outfd) {
 
-  dprintf(net->outfd,"[network] initializing network api ...\n");
+  dprintf(outfd,"[network] initializing network api ...\n");
 
   memset(net->connection,0,MAX_CONNECTIONS*sizeof(t_connection));
   net->c_count=0;
@@ -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;