IpcChannel Constructors

Definition

Initializes a new instance of the IpcChannel class.

Overloads

IpcChannel()

Initializes a new instance of the IpcChannel class, activating only a client channel, and not a server channel.

IpcChannel(String)

Initializes a new instance of the IpcChannel class with a server channel that listens on the specified IPC port.

IpcChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider)

Initializes a new instance of the IpcChannel class with the specified configuration properties and sinks.

IpcChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider, CommonSecurityDescriptor)

Initializes a new instance of the IpcChannel class with the specified configuration properties and sinks.

IpcChannel()

Initializes a new instance of the IpcChannel class, activating only a client channel, and not a server channel.

public:
 IpcChannel();
public IpcChannel ();
Public Sub New ()

Examples

The following code example shows how to use this constructor. This code example is part of a larger example provided for the IpcChannel class.

// Create the channel.
IpcChannel^ channel = gcnew IpcChannel;
// Create the channel.
IpcChannel channel = new IpcChannel();

Applies to

IpcChannel(String)

Initializes a new instance of the IpcChannel class with a server channel that listens on the specified IPC port.

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

Parameters

portName
String

The name of the IPC port.

Examples

The following code example shows how to use this constructor. This code example is part of a larger example provided for the IpcChannel class.

// Create the server channel.
IpcChannel^ serverChannel = gcnew IpcChannel( L"localhost:9090" );
// Create the server channel.
IpcChannel serverChannel =
    new IpcChannel("localhost:9090");

Applies to

IpcChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider)

Initializes a new instance of the IpcChannel class with the specified configuration properties and sinks.

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

Parameters

properties
IDictionary

A IDictionary collection specifying values for configuration properties to be used by the client and server channels.

clientSinkProvider
IClientChannelSinkProvider

The IClientChannelSinkProvider implementation to be used by the client channel.

serverSinkProvider
IServerChannelSinkProvider

The IServerChannelSinkProvider implementation to be used by the server channel.

Examples

The following code example shows how to use this constructor. This code example is part of a larger example provided for the IpcChannel class.

// 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";
IpcChannel^ serverChannel = gcnew IpcChannel( properties,nullptr,nullptr );
// Create the server channel.
System.Collections.IDictionary properties =
    new System.Collections.Hashtable();
properties["name"] = "ipc";
properties["priority"] = "20";
properties["portName"] = "localhost:9090";
IpcChannel serverChannel = new IpcChannel(properties, null, null);

Remarks

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

Channel sinks provide a plug-in point that allows access to the underlying messages flowing through the channel as well as the stream used by the transport mechanism to send messages to a remote object. Channel sinks are also responsible for transporting messages between the client and the server. Channel sinks are linked together in a chain, and all channel messages flow through this chain of sinks before the message is finally serialized and transported. If you do not require sink functionality, set the clientSinkProvider and serverSinkProvider parameters 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

IpcChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider, CommonSecurityDescriptor)

Initializes a new instance of the IpcChannel class with the specified configuration properties and sinks.

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

Parameters

properties
IDictionary

A IDictionary collection specifying values for configuration properties to be used by the client and server channels.

clientSinkProvider
IClientChannelSinkProvider

The IClientChannelSinkProvider implementation to be used by the client channel.

serverSinkProvider
IServerChannelSinkProvider

The IServerChannelSinkProvider implementation to be used by the server channel.

securityDescriptor
CommonSecurityDescriptor

The security descriptor.

Applies to