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);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.Tether.Manager.pas System.Tether.Manager.hpp |
System.Tether.Manager | TTetheringProtocols |
説明
指定されたタイプのプロトコルのインスタンスを作成して返します。
AProfile
は、このプロトコルを使用するテザリング プロファイルです。
AProtocolType
は、プロトコルのタイプです。AProtocolType
で登録されているプロトコルがない場合、GetProtocolInstance は null を返します。
AnAdapter
は、プロトコールがピア間に接続を確立するのに必要な情報を取得するために使用するアダプタです。
AsClient
は、作成されたインスタンスが、クライアントとしてのみ動作するべきか(True
)、または、クライアントおよびサーバーとして(False
)なのかを、決定します。
例外
TTetheringTCPProtocol のインスタンスを取得するために GetProtocolInstance を呼び出した際に発生する可能性のある例外については、TTetheringTCPProtocol.StartCommunication を参照してください。