語言

HttpChannel 建構函式

定義

初始化 HttpChannel 類別的新執行個體。

多載

名稱 Description
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 通道將使用的實作。

例外狀況

一個設定屬性格式錯誤。

備註

欲了解更多通道配置屬性,請參閱 通道與形式配置屬性。

通道匯提供一個外掛點,允許存取通道中流經的底層訊息,以及傳輸機制用來向遠端物件傳送訊息的串流。 通道匯也負責在用戶端與伺服器間傳送訊息。 通道匯以鏈條相連,所有通道訊息在訊息最終序列化並傳輸前都會經過這條匯鏈。 如果你不需要匯入功能,請將 and clientSinkProvider 參數設serverSinkProvider為 null。

另請參閱

適用於