System.Tether.Manager.TTetheringProtocols.GetProtocolInstance
Delphi
class function GetProtocolInstance(const AProfile: TTetheringProfile; const AProtocolType: TTetheringProtocolType; const AnAdapter: TTetheringAdapter; AsClient: Boolean): TTetheringProtocol;
C++
__classmethod TTetheringProtocol* __fastcall GetProtocolInstance(TTetheringProfile* const AProfile, const System::UnicodeString AProtocolType, TTetheringAdapter* const AnAdapter, bool AsClient);
Propriétés
| Type | Visibilité | Source | Unité | Parent |
|---|---|---|---|---|
| function | public | System.Tether.Manager.pas System.Tether.Manager.hpp |
System.Tether.Manager | TTetheringProtocols |
Description
Crée et renvoie une instance d'un protocole du type spécifié.
S'il n'existe aucun protocole recensé avec AProtocolType, GetProtocolInstance renvoie null.
AsClient détermine si l'instance créée doit fonctionner en tant que client seulement (True) ou en tant que client et serveur en même temps (False).
Exceptions
Si Started vaut True, voir TTetheringTCPProtocol.StartCommunication pour des informations sur les exceptions pouvant se déclencher quand vous appelez GetProtocolInstance pour obtenir une instance de TTetheringTCPProtocol.