Change demo to enable *four* simultaneous echo server connections at once\!

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@124 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
follower 17 years ago
parent f9153bf652
commit c63aa9aca5

@ -537,12 +537,13 @@ void setup () {
conn.close();
#endif
EchoServer server = EchoServer(7);
EchoServer server1 = EchoServer(8);
// This uses the 1-argument constructor of EchoServer and supplies it with 7 for each instance.
EchoServer servers[MAX_SOCK_NUM] = {7, 7, 7, 7}; // This will break if MAX_SOCK_NUM changes.
while (1) {
server.next();
server1.next();
for (int i=0; i<MAX_SOCK_NUM; i++) {
servers[i].next();
}
}

Loading…
Cancel
Save