MCPcopy Create free account
hub / github.com/DanielOgorchock/ST_Anything / accept

Method accept

Arduino/libraries/Ethernet2/src/EthernetServer.cpp:29–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void EthernetServer::accept()
30{
31 int listening = 0;
32
33 for (int sock = 0; sock < MAX_SOCK_NUM; sock++) {
34 EthernetClient client(sock);
35
36 if (EthernetClass::_server_port[sock] == _port) {
37 if (client.status() == SnSR::LISTEN) {
38 listening = 1;
39 }
40 else if (client.status() == SnSR::CLOSE_WAIT && !client.available()) {
41 client.stop();
42 }
43 }
44 }
45
46 if (!listening) {
47 begin();
48 }
49}
50
51EthernetClient EthernetServer::available()
52{

Callers

nothing calls this directly

Calls 3

statusMethod · 0.45
availableMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected