Forum Discussion
Altera_Forum
Honored Contributor
16 years agoMultiple socket server
Hi everyone! I a Nios newbie, so I'm sorry if I'm asking any FAQ, but I can't find any information on the subject. I want to build a multiport socket server For example, imagine server whic...
Altera_Forum
Honored Contributor
16 years agoActually I had understood there was some sort of problem with the select() function, so I solved the problem with a non-blocking call and forcing a sleep if there's no data available from the socket.
i.e. : if (select(max_socket, &readfds, NULL, NULL, &tout) <= 0) { TK_SLEEP(5); continue; } with a zero tout. Now I will look at the patch you suggested which is probably better. Thank you for your help Slacker.