Use new 'EchoServer' classes for demo instead of old non-class demo. Run two echo servers simultaneously on ports 7 & 8 for one connection each. Note: When I first did this I didn't realise that the driver/chip seems to function quite happily when two servers listen on the same port--it seems to queue them.

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@122 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
follower 17 years ago
parent 43c20bf422
commit 9a9ff8ed2a

@ -513,6 +513,7 @@ void setup () {
/**/
Serial.println("Test sockets...");
#if 0
NetworkConnection conn = Network.listen(7);
Serial.println("Waiting for connection...");
@ -533,7 +534,17 @@ void setup () {
Serial.println("");
conn.close();
conn.close();
#endif
EchoServer server = EchoServer(7);
EchoServer server1 = EchoServer(8);
while (1) {
server.next();
server1.next();
}
Serial.println("End test and dummy loop");
while (1) {}

Loading…
Cancel
Save