IpcServerChannel Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy IpcServerChannel.

Przeciążenia

IpcServerChannel(String)

Inicjuje IpcServerChannel nowe wystąpienie klasy o określonej nazwie portu IPC.

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inicjuje IpcServerChannel nowe wystąpienie klasy z określonymi właściwościami kanału i ujściem.

IpcServerChannel(String, String)

Inicjuje IpcServerChannel nowe wystąpienie klasy o określonej nazwie kanału i nazwie portu IPC.

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inicjuje IpcServerChannel nowe wystąpienie klasy z określonymi właściwościami kanału, ujściem i deskryptorem zabezpieczeń.

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inicjuje IpcServerChannel nowe wystąpienie klasy o określonej nazwie kanału, nazwie portu IPC i ujściu.

IpcServerChannel(String)

Inicjuje IpcServerChannel nowe wystąpienie klasy o określonej nazwie 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

Nazwa portu IPC, który ma być używany przez kanał.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać tego konstruktora.

// 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);

Dotyczy

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inicjuje IpcServerChannel nowe wystąpienie klasy z określonymi właściwościami kanału i ujściem.

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

IDictionary Kolekcja określająca wartości właściwości konfiguracji, które mają być używane przez kanał.

sinkProvider
IServerChannelSinkProvider

Implementacja IServerChannelSinkProvider do użycia przez kanał.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać tego konstruktora.

// 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);

Uwagi

Aby uzyskać więcej informacji na temat właściwości konfiguracji kanału, zobacz Właściwości konfiguracji kanału i formatnika.

Jeśli nie potrzebujesz funkcji ujścia sinkProvider , ustaw parametr na null.

Przestroga

Podczas ustawiania exclusiveAddressUse właściwości na w argumencie properties można zarejestrować false kilka IpcServerChannel obiektów dla tego samego nazwanego potoku. W takim przypadku żądania mogą przejść do dowolnego z zarejestrowanych kanałów. To ustawienie jest uznawane za bezpieczne tylko wtedy, gdy są również używane kontrolery ALC.

Zobacz też

Dotyczy

IpcServerChannel(String, String)

Inicjuje IpcServerChannel nowe wystąpienie klasy o określonej nazwie kanału i nazwie 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

Nazwa kanału.

portName
String

Nazwa portu IPC, który ma być używany przez kanał.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać tego konstruktora.

// 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);

Uwagi

Ten konstruktor ustawia ChannelName właściwość przy użyciu parametru name . Jeśli chcesz zarejestrować więcej niż jeden kanał, każdy kanał musi mieć unikatową nazwę.

Dotyczy

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inicjuje IpcServerChannel nowe wystąpienie klasy z określonymi właściwościami kanału, ujściem i deskryptorem zabezpieczeń.

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

IDictionary Kolekcja określająca wartości właściwości konfiguracji, które mają być używane przez kanał.

sinkProvider
IServerChannelSinkProvider

Implementacja IServerChannelSinkProvider do użycia przez kanał.

securityDescriptor
CommonSecurityDescriptor

Element do CommonSecurityDescriptor użycia przez kanał.

Uwagi

Aby uzyskać więcej informacji na temat właściwości konfiguracji kanału, zobacz Właściwości konfiguracji kanału i formatnika.

Jeśli nie potrzebujesz funkcji ujścia sinkProvider , ustaw parametr na null. Jeśli nie potrzebujesz deskryptora zabezpieczeń, ustaw securityDescriptor parametr na null.

Przestroga

Podczas ustawiania exclusiveAddressUse właściwości na w argumencie properties można zarejestrować false kilka IpcServerChannel obiektów dla tego samego nazwanego potoku. W takim przypadku żądania mogą przejść do dowolnego z zarejestrowanych kanałów. To ustawienie jest uznawane za bezpieczne tylko wtedy, gdy są również używane kontrolery ALC.

Zobacz też

Dotyczy

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inicjuje IpcServerChannel nowe wystąpienie klasy o określonej nazwie kanału, nazwie portu IPC i ujściu.

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

Nazwa kanału.

portName
String

Nazwa portu IPC, który ma być używany przez kanał.

sinkProvider
IServerChannelSinkProvider

Implementacja IServerChannelSinkProvider do użycia przez kanał.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać tego konstruktora.

// 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);

Uwagi

Ten konstruktor ustawia ChannelName właściwość przy użyciu parametru name . Jeśli chcesz zarejestrować więcej niż jeden kanał, każdy kanał musi mieć unikatową nazwę.

Jeśli nie potrzebujesz funkcji ujścia sinkProvider , ustaw parametr na null.

Dotyczy