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

Method internalOnConnected

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

Source from the content-addressed store, hash-verified

401}
402
403err_t TcpConnection::internalOnConnected(err_t err)
404{
405 debug_tcp_d("connected: useSSL: %d, Error: %d", useSsl, err);
406
407 if(useSsl && err == ERR_OK) {
408 if(ssl == nullptr) {
409 debug_tcp_e("SSL disabled: aborting connection");
410 return ERR_ABRT;
411 }
412 if(!ssl->onConnect(tcp)) {
413 return ERR_ABRT;
414 }
415 if(!ssl->isConnected()) {
416 return ERR_OK;
417 }
418 }
419
420 err_t res = onConnected(err);
421 checkSelfFree();
422 debug_tcp_ext("<connected");
423 return res;
424}
425
426bool TcpConnection::enableSsl(const String& hostName)
427{

Callers 1

internalConnectMethod · 0.80

Calls 3

onConnectedFunction · 0.50
onConnectMethod · 0.45
isConnectedMethod · 0.45

Tested by

no test coverage detected