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

伺服器通道接聽的連接埠。

備註

使用此建構函式時,使用的預設 IClientChannelSinkProviderSoapClientFormatterSinkProvider

適用於

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

另請參閱

適用於