Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TcpChannel Constructor (IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider)

TcpChannel Constructor (IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider)

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

Namespace:  System.Runtime.Remoting.Channels.Tcp
Assembly:  System.Runtime.Remoting (in System.Runtime.Remoting.dll)

public TcpChannel(
	IDictionary properties,
	IClientChannelSinkProvider clientSinkProvider,
	IServerChannelSinkProvider serverSinkProvider
)

Parameters

properties
Type: System.Collections.IDictionary
A IDictionary collection that specifies values for configuration properties to be used by the client and server channels.
clientSinkProvider
Type: System.Runtime.Remoting.Channels.IClientChannelSinkProvider
The IClientChannelSinkProvider implementation to be used by the client channel.
serverSinkProvider
Type: System.Runtime.Remoting.Channels.IServerChannelSinkProvider
The IServerChannelSinkProvider implementation to be used by the server channel.

ExceptionCondition
ArgumentException

A provided channel property was improperly formatted.

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

NoteNote

If the server computer is running Windows 95/98/Me, the server TcpChannel cannot be specified as secure.

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.

The following code example shows how to use this constructor.


// Specify the properties for the server channel.
System.Collections.IDictionary dict = 
    new System.Collections.Hashtable();
dict["port"] = 9090;
dict["authenticationMode"] = "IdentifyCallers";

// Set up the server channel.
TcpChannel serverChannel = new TcpChannel(dict, null, null);
ChannelServices.RegisterChannel(serverChannel);    


.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2015 Microsoft