Sdílet prostřednictvím


IpcServerChannel Konstruktory

Definice

Inicializuje novou instanci IpcServerChannel třídy .

Přetížení

IpcServerChannel(String)

Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem portu IPC.

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inicializuje novou instanci IpcServerChannel třídy se zadanými vlastnostmi kanálu a jímkou.

IpcServerChannel(String, String)

Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem kanálu a názvem portu IPC.

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inicializuje novou instanci IpcServerChannel třídy se zadanými vlastnostmi kanálu, jímkou a popisovačem zabezpečení.

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem kanálu, názvem portu IPC a jímkou.

IpcServerChannel(String)

Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem portu IPC.

public:
 IpcServerChannel(System::String ^ portName);
public IpcServerChannel (string portName);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : string -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (portName As String)

Parametry

portName
String

Název portu IPC, který bude kanál používat.

Příklady

Následující příklad kódu ukazuje, jak použít tento konstruktor.

// Create and register an IPC channel
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( L"remote" );
ChannelServices::RegisterChannel( serverChannel );
// Create and register an IPC channel
IpcServerChannel serverChannel = new IpcServerChannel("remote");
ChannelServices.RegisterChannel(serverChannel);

Platí pro

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inicializuje novou instanci IpcServerChannel třídy se zadanými vlastnostmi kanálu a jímkou.

public:
 IpcServerChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider);
public IpcServerChannel (System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IServerChannelSinkProvider -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (properties As IDictionary, sinkProvider As IServerChannelSinkProvider)

Parametry

properties
IDictionary

Kolekce IDictionary , která určuje hodnoty vlastností konfigurace, které má kanál použít.

sinkProvider
IServerChannelSinkProvider

Implementace IServerChannelSinkProvider , kterou má kanál použít.

Příklady

Následující příklad kódu ukazuje, jak použít tento konstruktor.

// Create the server channel.
System::Collections::IDictionary^ properties = gcnew System::Collections::Hashtable;
properties->default[ L"name" ] = L"ipc";
properties->default[ L"priority" ] = L"20";
properties->default[ L"portName" ] = L"localhost:9090";
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( properties, nullptr );
// Create the server channel.
System.Collections.IDictionary properties =
    new System.Collections.Hashtable();
properties["name"] = "ipc";
properties["priority"] = "20";
properties["portName"] = "localhost:9090";
IpcServerChannel serverChannel =
    new IpcServerChannel(properties, null);

Poznámky

Další informace o vlastnostech konfigurace kanálu najdete v tématu Vlastnosti konfigurace kanálu a formátovače.

Pokud funkci jímky nepotřebujete, nastavte sinkProvider parametr na nullhodnotu .

Upozornění

Při nastavení exclusiveAddressUse vlastnosti false na v argumentu properties lze pro stejnou pojmenovanou kanál zaregistrovat několik IpcServerChannel objektů. V takovém případě mohou žádosti přejít na kterýkoli z registrovaných kanálů. Toto nastavení se považuje za bezpečné pouze v případě, že se používají také řadiče zabezpečení.

Viz také

Platí pro

IpcServerChannel(String, String)

Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem kanálu a názvem portu IPC.

public:
 IpcServerChannel(System::String ^ name, System::String ^ portName);
public IpcServerChannel (string name, string portName);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : string * string -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (name As String, portName As String)

Parametry

name
String

Název kanálu.

portName
String

Název portu IPC, který bude kanál používat.

Příklady

Následující příklad kódu ukazuje, jak použít tento konstruktor.

// Create the server channel.
String^ name = L"ipc";
String^ portName = L"localhost:9090";
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( name,portName );
// Create the server channel.
string name = "ipc";
string portName = "localhost:9090";
IpcServerChannel serverChannel =
    new IpcServerChannel(name, portName);

Poznámky

Tento konstruktor nastaví ChannelName vlastnost pomocí parametru name . Pokud chcete zaregistrovat více než jeden kanál, musí mít každý kanál jedinečný název.

Platí pro

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inicializuje novou instanci IpcServerChannel třídy se zadanými vlastnostmi kanálu, jímkou a popisovačem zabezpečení.

public:
 IpcServerChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider, System::Security::AccessControl::CommonSecurityDescriptor ^ securityDescriptor);
public IpcServerChannel (System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider, System.Security.AccessControl.CommonSecurityDescriptor securityDescriptor);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IServerChannelSinkProvider * System.Security.AccessControl.CommonSecurityDescriptor -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (properties As IDictionary, sinkProvider As IServerChannelSinkProvider, securityDescriptor As CommonSecurityDescriptor)

Parametry

properties
IDictionary

Kolekce IDictionary , která určuje hodnoty vlastností konfigurace, které má kanál použít.

sinkProvider
IServerChannelSinkProvider

Implementace IServerChannelSinkProvider , kterou má kanál použít.

securityDescriptor
CommonSecurityDescriptor

A CommonSecurityDescriptor , které bude používat kanál.

Poznámky

Další informace o vlastnostech konfigurace kanálu najdete v tématu Vlastnosti konfigurace kanálu a formátovače.

Pokud funkci jímky nepotřebujete, nastavte sinkProvider parametr na nullhodnotu . Pokud popisovač zabezpečení nepotřebujete, nastavte securityDescriptor parametr na nullhodnotu .

Upozornění

Při nastavení exclusiveAddressUse vlastnosti false na v argumentu properties lze pro stejnou pojmenovanou kanál zaregistrovat několik IpcServerChannel objektů. V takovém případě mohou žádosti přejít na kterýkoli z registrovaných kanálů. Toto nastavení se považuje za bezpečné pouze v případě, že se používají také řadiče zabezpečení.

Viz také

Platí pro

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem kanálu, názvem portu IPC a jímkou.

public:
 IpcServerChannel(System::String ^ name, System::String ^ portName, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider);
public IpcServerChannel (string name, string portName, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : string * string * System.Runtime.Remoting.Channels.IServerChannelSinkProvider -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (name As String, portName As String, sinkProvider As IServerChannelSinkProvider)

Parametry

name
String

Název kanálu.

portName
String

Název portu IPC, který bude kanál používat.

sinkProvider
IServerChannelSinkProvider

Implementace IServerChannelSinkProvider , kterou má kanál použít.

Příklady

Následující příklad kódu ukazuje, jak použít tento konstruktor.

// Create the server channel.
String^ name = L"ipc";
String^ portName = L"localhost:9090";
IServerChannelSinkProvider^ sinkProvider = nullptr;
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( name,portName,sinkProvider );
// Create the server channel.
string name = "ipc";
string portName = "localhost:9090";
IServerChannelSinkProvider sinkProvider = null;
IpcServerChannel serverChannel =
    new IpcServerChannel(name, portName, sinkProvider);

Poznámky

Tento konstruktor nastaví ChannelName vlastnost pomocí parametru name . Pokud chcete zaregistrovat více než jeden kanál, musí mít každý kanál jedinečný název.

Pokud funkci jímky nepotřebujete, nastavte sinkProvider parametr na nullhodnotu .

Platí pro