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.
AProfile
is the tetheing profile that uses this protocol.
AProtocolType
specifies the type of protocol. If there is no protocol registered with AProtocolType
, GetProtocolInstance returns null.
AnAdapter
is the adapter that the protocol will use to obtain information necessary to establish the connection between peers.
AsClient
determines whether the created instance must work as a client only (True
) or both as a client and as a server (False
).
Exceptions
See TTetheringTCPProtocol.StartCommunication for information about exceptions that might occur when you call GetProtocolInstance to get an instance of TTetheringTCPProtocol.