I've done some experimentation and it seems that even without using the OnBeforeConnect or OnBeforeDisconnect methods, starting with both components disconnected, calling TMyConnection.Connect automatically calls TScSSHClient.Connect (but not vice versa)
and with both components connected, calling calling TScSSHClient.Disconnect automatically calls TMyConnection.Disconnect (but not vice versa)
Also depending on the order of connection / disconnection the traffic may be encrypted , not encrypted or not possible.
I made the table below. Can anyone confirm if this logic is correct, and if it's not correct please can you make it correct for me.
Note this is without using
any OnBefore/ OnAfter connect or disconnect methods, just linking the
components together.
starting state |
|
operation |
endting state |
traffic |
||
TScSSHClient |
TMyConnection |
|
|
TScSSHClient |
TMyConnection |
|
disconnected |
disconnected |
no traffic |
TMyConnection.Connect |
connected |
connected |
encryted traffic |
disconnected |
disconnected |
no traffic |
TScSSHClient.Connect |
connected |
disconnected |
no traffic |
connected |
disconnected |
no traffic |
TMyConnection.Connect |
connected |
connected |
un encrypted traffic |
disconnected |
connected |
not a possible starting state as connecting TMyConnection also connects TScSSHClient |
||||
|
|
|
|
|
|
|
connected |
connected |
# |
TMyConnection.DisConnect |
connected |
disconnected |
no traffic |
connected |
connected |
# |
TScSSHClient.DisConnect |
disconnected |
disconnected |
no traffic |
connected |
disconnected |
no traffic |
TScSSHClient.DisConnect |
disconnected |
disconnected |
no traffic |
disconnected |
connected |
not a possible starting state as connecting TMyConnection also connects TScSSHClient |
||||
# |
Either encryted or un encrypted trafic depending upon which component was connected first |
|