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

Method close

Sming/Components/Network/src/Network/TcpConnection.cpp:280–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void TcpConnection::close()
281{
282 if(ssl != nullptr) {
283 ssl->close();
284 }
285
286 if(tcp == nullptr) {
287 return;
288 }
289 debug_tcp_d("connection closing");
290
291 tcp_poll(tcp, staticOnPoll, 1);
292 tcp_arg(tcp, nullptr); // reset pointer to close connection on next callback
293 tcp = nullptr;
294
295 onClosed();
296
297 checkSelfFree();
298}
299
300void TcpConnection::initialize(tcp_pcb* pcb)
301{

Callers 1

onErrorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected