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;
/* 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);