HttpChannel 构造函数

定义

初始化 HttpChannel 类的新实例。

重载

名称 说明
HttpChannel()

初始化 HttpChannel 类的新实例。

HttpChannel(Int32)

使用侦听指定端口的服务器通道初始化类的新实例 HttpChannel

HttpChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider)

使用指定的配置属性和接收器初始化类的新实例 HttpChannel

HttpChannel()

初始化 HttpChannel 类的新实例。

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

注解

此构造函数返回的 HttpChannel 实例的配置属性都设置为其默认值。

适用于

HttpChannel(Int32)

使用侦听指定端口的服务器通道初始化类的新实例 HttpChannel

public:
 HttpChannel(int port);
public HttpChannel(int port);
new System.Runtime.Remoting.Channels.Http.HttpChannel : int -> System.Runtime.Remoting.Channels.Http.HttpChannel
Public Sub New (port As Integer)

参数

port
Int32

服务器通道侦听的端口。

注解

使用此构造函数时,使用的默认 IClientChannelSinkProvider 构造函数为 SoapClientFormatterSinkProvider.

适用于

HttpChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider)

使用指定的配置属性和接收器初始化类的新实例 HttpChannel

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

参数

properties
IDictionary

一个 IDictionary 集合,指定客户端和服务器通道要使用的配置属性的值。

clientSinkProvider
IClientChannelSinkProvider

IClientChannelSinkProvider客户端通道要使用的实现。

serverSinkProvider
IServerChannelSinkProvider

服务器 IServerChannelSinkProvider 通道要使用的实现。

例外

配置属性的格式不正确。

注解

通道接收器提供一个插件点,允许访问流经通道的基础消息以及传输机制用于将消息发送到远程对象的流。 通道接收器还负责在客户端和服务器之间传输消息。 通道接收器在链中链接在一起,所有通道消息在最终序列化和传输消息之前会流经此接收器链。 如果不需要接收器功能,请将 clientSinkProviderserverSinkProvider 参数设置为 null

适用于