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);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Tether.Manager.pas System.Tether.Manager.hpp |
System.Tether.Manager | TTetheringProtocols |
Description
Creates and returns an instance of a protocol of the specified type.
If there is no protocol registered with AProtocolType
, GetProtocolInstance returns null.
AsClient
determines whether the created instance must work as a client only (True
) or both as a client and as a server (False
).
Exceptions
If Started
is True
, see TTetheringTCPProtocol.StartCommunication for information about exceptions that might occur when you call GetProtocolInstance to get an instance of TTetheringTCPProtocol.