API:System.Tether.TCPProtocol.TTetheringTCPProtocol.CreateInstance
Delphi
class function CreateInstance(const AnAdapter: TTetheringAdapter; AsClient: Boolean): TTetheringProtocol; override;
C++
__classmethod virtual System::Tether::Manager::TTetheringProtocol* __fastcall CreateInstance(System::Tether::Manager::TTetheringAdapter* const AnAdapter, bool AsClient);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Tether.TCPProtocol.pas System.Tether.TCPProtocol.hpp |
System.Tether.TCPProtocol | TTetheringTCPProtocol |
Description
Creates an instance of the protocol and returns it.
System.Tether.TCPProtocol.TTetheringTCPProtocol.CreateInstance inherits from System.Tether.Manager.TTetheringProtocol.CreateInstance. All content below this line refers to System.Tether.Manager.TTetheringProtocol.CreateInstance.
Creates an instance of the protocol and returns it.
CreateInstance receives the following parameters:
AnAdapter
is the adapter that the protocol will use to obtain information necessary to establish the connection between peers.AsClient
determines whether the end of the connection that this instance of TTetheringProtocol handles behaves as a client (True
) or as a server (False
, default).
This is an abstract method. You must override this function if you create a subclass of TTetheringProtocol.