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 agoFurther information:
The problems arises when I call select() for both sockets, waiting for a connection. The higher priority one works The lower priority one connects (the client is connected) but select() doesn't return and the data actually is not accepted. I tried to set the select() call non blocking (zero timeout) and inserting a TK_SLEEP() after it, as suggested in a previous post, but select() still blocks. Any ideas? On the other hand I solved the problem with connection closing: recv() was not tested for zero return values, indicating that the client closed the connection.