System.Tether.Manager.TTetheringProtocols.GetProtocolInstance

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

class function GetProtocolInstance(const AProtocolType: TTetheringProtocolType; const AnAdapter: TTetheringAdapter;  AsClient, Started: Boolean): TTetheringProtocol;

C++

__classmethod TTetheringProtocol* __fastcall GetProtocolInstance(const System::UnicodeString AProtocolType, TTetheringAdapter* const AnAdapter, bool AsClient, bool Started);

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.

See Also