System.Net.Socket.TNetEndpoint.Create

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

class function Create(const Name, Service: string; SocketType: TSocketType = TSocketType.TCP): TNetEndpoint; overload; static;
class function Create(const Address: Cardinal; const Port: Word): TNetEndpoint; overload; static;
class function Create(const B1, B2, B3, B4: Byte; const Port: Word): TNetEndpoint; overload; static;
class function Create(const Address: TIPAddress; const Service: string; SocketType: TSocketType = TSocketType.TCP): TNetEndpoint; overload; static;
class function Create(const Address: TIPAddress; const Port: Word): TNetEndpoint; overload; static;
class function Create(const Family: Word; const Name, Service: string; SocketType: TSocketType = TSocketType.TCP): TNetEndpoint; overload; static;
class function Create(const Family: Word; const Address: Cardinal; const Port: Word): TNetEndpoint; overload; static;
class function Create(const Family: Word; const B1, B2, B3, B4: Byte; const Port: Word): TNetEndpoint; overload; static;
class function Create(const Family: Word; const Address: TIPAddress; const Service: string; SocketType: TSocketType = TSocketType.TCP): TNetEndpoint; overload; static;
class function Create(const Family: Word; const Address: TIPAddress; const Port: Word): TNetEndpoint; overload; static;
class function Create(const Endpoint: sockaddr_in): TNetEndpoint; overload; inline; static;

C++

static TNetEndpoint __fastcall Create(const System::UnicodeString Name, const System::UnicodeString Service, TSocketType SocketType = (TSocketType)(0x0))/* overload */;
static TNetEndpoint __fastcall Create(const unsigned Address, const System::Word Port)/* overload */;
static TNetEndpoint __fastcall Create(const System::Byte B1, const System::Byte B2, const System::Byte B3, const System::Byte B4, const System::Word Port)/* overload */;
static TNetEndpoint __fastcall Create(const TIPAddress Address, const System::UnicodeString Service, TSocketType SocketType = (TSocketType)(0x0))/* overload */;
static TNetEndpoint __fastcall Create(const TIPAddress Address, const System::Word Port)/* overload */;
static TNetEndpoint __fastcall Create(const System::Word Family, const System::UnicodeString Name, const System::UnicodeString Service, TSocketType SocketType = (TSocketType)(0x0))/* overload */;
static TNetEndpoint __fastcall Create(const System::Word Family, const unsigned Address, const System::Word Port)/* overload */;
static TNetEndpoint __fastcall Create(const System::Word Family, const System::Byte B1, const System::Byte B2, const System::Byte B3, const System::Byte B4, const System::Word Port)/* overload */;
static TNetEndpoint __fastcall Create(const System::Word Family, const TIPAddress Address, const System::UnicodeString Service, TSocketType SocketType = (TSocketType)(0x0))/* overload */;
static TNetEndpoint __fastcall Create(const System::Word Family, const TIPAddress Address, const System::Word Port)/* overload */;
static TNetEndpoint __fastcall Create(const sockaddr_in &Endpoint)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
System.Net.Socket.pas
System.Net.Socket.hpp
System.Net.Socket TNetEndpoint


説明

TNetEndpoint のインスタンスを作成します。

受け取るパラメータの組み合わせは次のとおりです。

  1. Family(任意指定)
  2. Address または Name または B1、B2、B3、B4
  3. Service または Port
  4. SocketType(任意指定。指定できるのは前のパラメータが Service の場合のみ。デフォルトは TSocketType.TCP

それぞれのパラメータの意味は次のとおりです。

  • Family: IP アドレスのアドレス ファミリ
  • Address: IP アドレス。TIPAddress のインスタンスまたは Cardinal として指定します。
  • Nameドメイン名
  • B1、B2、B3、B4: IPv4 アドレスのそれぞれのオクテット(8 ビット)。
  • Serviceサービス名
  • Port: ポート番号。
  • SocketType: ソケットの種類。

関連項目