MCPcopy Create free account
hub / github.com/SmingHub/Sming / staticAccept

Method staticAccept

Sming/Components/Network/src/Network/TcpServer.cpp:131–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131err_t TcpServer::staticAccept(void* arg, tcp_pcb* new_tcp, err_t err)
132{
133 auto con = static_cast<TcpServer*>(arg);
134
135 if(con == nullptr) {
136 debug_e("NO CONNECTION ON TCP");
137 //closeTcpConnection(new_tcp);
138 tcp_abort(new_tcp);
139 return ERR_ABRT;
140 } else {
141 con->sleep = 0;
142 }
143
144 err_t res = con->onAccept(new_tcp, err);
145 return res;
146}
147
148void TcpServer::shutdown()
149{

Callers

nothing calls this directly

Calls 1

onAcceptMethod · 0.45

Tested by

no test coverage detected