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é.
AProfile
est le profile de tethering utilisé par ce protocole.
AProtocolType
spécifie le type de protocole. S'il n'y a pas de protocole recensé avec AProtocolType
, GetProtocolInstance renvoie null.
AnAdapter
est l'adaptateur que le protocole va utiliser afin d'obtenir les informations nécessaires pour l'établissement de la connexion entre homologues.
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
Voir TTetheringTCPProtocol.StartCommunication pour des informations sur les exceptions qui pourraient se produire lorsque vous appelez GetProtocolInstance pour obtenir une instance de TTetheringTCPProtocol.