if((net->connection[i].fd=socket(AF_INET,SOCK_STREAM,0))==-1) {
perror("[network] socket call");
return N_ERROR;
}
if((net->connection[i].fd=socket(AF_INET,SOCK_STREAM,0))==-1) {
perror("[network] socket call");
return N_ERROR;
}
printf("[network] established connection to %s port %d on channel %d\n",
net->connection[i].ip,net->connection[i].port,i);
printf("[network] established connection to %s port %d on channel %d\n",
net->connection[i].ip,net->connection[i].port,i);
if((net->connection[channel].fd=accept(net->l_fd,
(struct sockaddr *)&addr,
&len))==-1) {
if((net->connection[channel].fd=accept(net->l_fd,
(struct sockaddr *)&addr,
&len))==-1) {