Compartilhar via


IpcServerChannel Construtores

Definição

Inicializa uma nova instância da classe IpcServerChannel.

Sobrecargas

IpcServerChannel(String)

Inicializa uma nova instância da classe IpcServerChannel com o nome da porta IPC especificado.

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inicializa uma nova instância da classe IpcServerChannel com as propriedades de canal e os coletores especificados.

IpcServerChannel(String, String)

Inicializa uma nova instância da classe IpcServerChannel com o nome do canal e o nome da porta IPC especificados.

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inicializa uma nova instância da classe IpcServerChannel com propriedades de canal, coletor e descritor de segurança especificados.

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inicializa uma nova instância da classe IpcServerChannel com o nome do canal, o nome da porta IPC e o coletor especificados.

IpcServerChannel(String)

Inicializa uma nova instância da classe IpcServerChannel com o nome da porta IPC especificado.

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)

Parâmetros

portName
String

O nome da porta IPC a ser usada pelo canal.

Exemplos

O exemplo de código a seguir mostra como usar esse construtor.

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

Aplica-se a

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inicializa uma nova instância da classe IpcServerChannel com as propriedades de canal e os coletores especificados.

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)

Parâmetros

properties
IDictionary

Uma coleção IDictionary que especifica valores para propriedades de configuração a serem usada pelo canal.

sinkProvider
IServerChannelSinkProvider

A implementação IServerChannelSinkProvider a ser usada pelo canal.

Exemplos

O exemplo de código a seguir mostra como usar esse construtor.

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

Comentários

Para obter mais informações sobre as propriedades de configuração de canal, consulte Propriedades de configuração de canal e formatador.

Se você não precisar da funcionalidade do coletor, defina o sinkProvider parâmetro como null.

Cuidado

Ao definir a exclusiveAddressUse propriedade como false no properties argumento , vários IpcServerChannel objetos podem ser registrados para o mesmo pipe nomeado. Nesse caso, as solicitações podem ir para qualquer um dos canais registrados. Essa configuração será considerada segura somente se os ALCs também forem usados.

Confira também

Aplica-se a

IpcServerChannel(String, String)

Inicializa uma nova instância da classe IpcServerChannel com o nome do canal e o nome da porta IPC especificados.

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)

Parâmetros

name
String

O nome do canal.

portName
String

O nome da porta IPC a ser usada pelo canal.

Exemplos

O exemplo de código a seguir mostra como usar esse construtor.

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

Comentários

Esse construtor define a ChannelName propriedade usando o name parâmetro . Se você quiser registrar mais de um canal, cada canal deverá ter um nome exclusivo.

Aplica-se a

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inicializa uma nova instância da classe IpcServerChannel com propriedades de canal, coletor e descritor de segurança especificados.

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)

Parâmetros

properties
IDictionary

Uma coleção IDictionary que especifica valores para propriedades de configuração a serem usada pelo canal.

sinkProvider
IServerChannelSinkProvider

A implementação IServerChannelSinkProvider a ser usada pelo canal.

securityDescriptor
CommonSecurityDescriptor

Um CommonSecurityDescriptor a ser usado pelo canal.

Comentários

Para obter mais informações sobre as propriedades de configuração de canal, consulte Propriedades de configuração de canal e formatador.

Se você não precisar da funcionalidade do coletor, defina o sinkProvider parâmetro como null. Se você não precisar de um descritor de segurança, defina o securityDescriptor parâmetro como null.

Cuidado

Ao definir a exclusiveAddressUse propriedade como false no properties argumento , vários IpcServerChannel objetos podem ser registrados para o mesmo pipe nomeado. Nesse caso, as solicitações podem ir para qualquer um dos canais registrados. Essa configuração será considerada segura somente se os ALCs também forem usados.

Confira também

Aplica-se a

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inicializa uma nova instância da classe IpcServerChannel com o nome do canal, o nome da porta IPC e o coletor especificados.

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)

Parâmetros

name
String

O nome do canal.

portName
String

O nome da porta IPC a ser usada pelo canal.

sinkProvider
IServerChannelSinkProvider

A implementação IServerChannelSinkProvider a ser usada pelo canal.

Exemplos

O exemplo de código a seguir mostra como usar esse construtor.

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

Comentários

Esse construtor define a ChannelName propriedade usando o name parâmetro . Se você quiser registrar mais de um canal, cada canal deverá ter um nome exclusivo.

Se você não precisar da funcionalidade do coletor, defina o sinkProvider parâmetro como null.

Aplica-se a