Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHow to reboot Simple Socket Server ?
Hi, I've implemented the Simple Socket server on a custom board. All is working fine, but I'd like to be able to start the board without the ethernet cable being connected (the server is not th...
Altera_Forum
Honored Contributor
11 years agoI think I've "dirtly" solved my problem. Before calling netmain_init(), one must close all sockets (including the primary socket, closed with socketclose(fd_listen) ), and then force the variable ifNumber to 0. Call netmain_init() and then recreate the primary socket, socket(...), bind(...) and listen(...) as in the beginning of the SSSSimpleServerTask() example.
If you have any other better solution, don't hesitate ...