Bewerken

Share via


IpcServerChannel Constructors

Definition

Initializes a new instance of the IpcServerChannel class.

Overloads

IpcServerChannel(String)

Initializes a new instance of the IpcServerChannel class with the specified IPC port name.

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Initializes a new instance of the IpcServerChannel class with the specified channel properties and sink.

IpcServerChannel(String, String)

Initializes a new instance of the IpcServerChannel class with the specified channel name and IPC port name.

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Initializes a new instance of the IpcServerChannel class with the specified channel properties, sink, and security descriptor.

IpcServerChannel(String, String, IServerChannelSinkProvider)

Initializes a new instance of the IpcServerChannel class with the specified channel name, IPC port name, and sink.

IpcServerChannel(String)

Initializes a new instance of the IpcServerChannel class with the specified IPC port name.

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)

Parameters

portName
String

The name of the IPC port to be used by the channel.

Examples

The following code example shows how to use this constructor.

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

Applies to

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Initializes a new instance of the IpcServerChannel class with the specified channel properties and sink.

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)

Parameters

properties
IDictionary

A IDictionary collection that specifies values for configuration properties to be used by the channel.

sinkProvider
IServerChannelSinkProvider

The IServerChannelSinkProvider implementation to be used by the channel.

Examples

The following code example shows how to use this constructor.

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

Remarks

For more information about channel configuration properties, see Channel and Formatter Configuration Properties.

If you do not require sink functionality, set the sinkProvider parameter to null.

Caution

When setting the exclusiveAddressUse property to false in the properties argument, several IpcServerChannel objects can be registered for the same named pipe. In such a case requests can go to any of the channels registered. This setting is considered secure only if ALCs are also used.

See also

Applies to

IpcServerChannel(String, String)

Initializes a new instance of the IpcServerChannel class with the specified channel name and IPC port name.

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)

Parameters

name
String

The name of the channel.

portName
String

The name of the IPC port to be used by the channel.

Examples

The following code example shows how to use this constructor.

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

Remarks

This constructor sets the ChannelName property by using the name parameter. If you want to register more than one channel, each channel must have a unique name.

Applies to

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Initializes a new instance of the IpcServerChannel class with the specified channel properties, sink, and security descriptor.

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)

Parameters

properties
IDictionary

A IDictionary collection that specifies values for configuration properties to be used by the channel.

sinkProvider
IServerChannelSinkProvider

The IServerChannelSinkProvider implementation to be used by the channel.

securityDescriptor
CommonSecurityDescriptor

A CommonSecurityDescriptor to be used by the channel.

Remarks

For more information about channel configuration properties, see Channel and Formatter Configuration Properties.

If you do not require sink functionality, set the sinkProvider parameter to null. If you do not require a security descriptor, set the securityDescriptor parameter to null.

Caution

When setting the exclusiveAddressUse property to false in the properties argument, several IpcServerChannel objects can be registered for the same named pipe. In such a case requests can go to any of the channels registered. This setting is considered secure only if ALCs are also used.

See also

Applies to

IpcServerChannel(String, String, IServerChannelSinkProvider)

Initializes a new instance of the IpcServerChannel class with the specified channel name, IPC port name, and sink.

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)

Parameters

name
String

The name of the channel.

portName
String

The name of the IPC port to be used by the channel.

sinkProvider
IServerChannelSinkProvider

The IServerChannelSinkProvider implementation to be used by the channel.

Examples

The following code example shows how to use this constructor.

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

Remarks

This constructor sets the ChannelName property by using the name parameter. If you want to register more than one channel, each channel must have a unique name.

If you do not require sink functionality, set the sinkProvider parameter to null.

Applies to