I have a w500 ethernet ic which is connected to a fpga.
W5300 had been drived as a “tcp server” and should be connected to multiple clients. I have heard that i need to establish one socket for each client. Am I right?
If so, how should I manage the sockets?
If W5300 is similar to W5500, then yes, you need to “establish one socket for each client”. In my application, I allocate 4 sockets for my embedded Web server. Instead of treating each socket individually, I treat them as an array of sockets.
Thanks a lot for your reply.
What do you means by" treat them as an array of sockets"?
At first, i initialize all the sockets simultaneously. But when it comes to check sockets status, don’t know how to react. Especially when only one of them has been stablished.
Could you describe how did you switch between sockets? And when?
I would be grateful if you draw a flowchart.
Thanks in advance.
I use ioLibrary.
I am not sure what you mean by “switch between sockets”. Each socket operates independently. They all have their own “states”, i.e., SOCK_CLOSED, SOCK_INIT, SOCK_LISTEN, SOCK_CLOSE_WAIT, SOCK_SYNRECV and SOCK_FIN_WAIT.