System.Runtime.Remoting.Channels.Tcp.TcpChannel Class

Provides a channel implementation that uses the TCP protocol to transmit messages.

See Also: TcpChannel

Syntax

public class TcpChannel : IChannelReceiver, IChannelSender

Remarks

Channels transport messages across remoting boundaries (for example, between computers on application domains). The TcpChannel class is a convenience class combining the functionality of the TcpClientChannel class and the TcpServerChannel class.

Channels are used by the .NET Framework remoting infrastructure to transport remote calls. When a client makes a call to a remote object, the call is serialized into a message that is sent by a client channel and received by a server channel. It is then deserialized and processed. Any returned values are transmitted by the server channel and received by the client channel.

To perform additional processing of messages, you can specify implementations of the IClientChannelSinkProvider and IServerChannelSinkProvider through which all messages processed by the TcpChannel are passed.

A TcpChannel object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static RemotingConfiguration.Configure(String) method) or programmatically (by passing a IDictionary collection to the TcpChannel.#ctor constructor). For more information about channel configuration properties, see Channel and Formatter Configuration Properties.

Note:

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

Requirements

Namespace: System.Runtime.Remoting.Channels.Tcp
Assembly: System.Runtime.Remoting (in System.Runtime.Remoting.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0

The members of System.Runtime.Remoting.Channels.Tcp.TcpChannel are listed below.

See Also: Object

Public Constructors

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

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

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

Public Properties

[read-only]
ChannelDataObject.

Gets the channel-specific data.

[read-only]
ChannelNameString.

Gets the name of the current channel.

[read-only]
ChannelPriorityInt32.

Gets the priority of the current channel.

Public Methods

CreateMessageSink(String, Object, out String) : IMessageSink
GetUrlsForUri(String) : String[]

Returns an array of all the URLs for an object with the specified URI, hosted on the current TcpChannel.

Parse(String, out String) : String
StartListening(Object)

Instructs the current channel to start listening for requests.

StopListening(Object)

Instructs the current channel to stop listening for requests.