HttpServerChannel コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
HttpServerChannel クラスの新しいインスタンスを初期化します。
オーバーロード
| 名前 | 説明 |
|---|---|
| HttpServerChannel() |
HttpServerChannel クラスの新しいインスタンスを初期化します。 |
| HttpServerChannel(Int32) |
指定したポートでリッスンする HttpServerChannel クラスの新しいインスタンスを初期化します。 |
| HttpServerChannel(IDictionary, IServerChannelSinkProvider) |
指定したチャネル プロパティとシンクを使用して、 HttpServerChannel クラスの新しいインスタンスを初期化します。 |
| HttpServerChannel(String, Int32) |
指定した名前で HttpServerChannel クラスの新しいインスタンスを初期化し、指定したポートでリッスンします。 |
| HttpServerChannel(String, Int32, IServerChannelSinkProvider) |
指定したポートでリッスンし、指定したシンクを使用する、指定したポートで HttpServerChannel クラスの新しいインスタンスを初期化します。 |
HttpServerChannel()
HttpServerChannel クラスの新しいインスタンスを初期化します。
public:
HttpServerChannel();
public HttpServerChannel();
Public Sub New ()
適用対象
HttpServerChannel(Int32)
指定したポートでリッスンする HttpServerChannel クラスの新しいインスタンスを初期化します。
public:
HttpServerChannel(int port);
public HttpServerChannel(int port);
new System.Runtime.Remoting.Channels.Http.HttpServerChannel : int -> System.Runtime.Remoting.Channels.Http.HttpServerChannel
Public Sub New (port As Integer)
パラメーター
- port
- Int32
チャネルがリッスンするポート。
注釈
使用可能なポートを動的に割り当てることを要求するには、 port パラメーターを 0 (ゼロ) に設定します。
適用対象
HttpServerChannel(IDictionary, IServerChannelSinkProvider)
指定したチャネル プロパティとシンクを使用して、 HttpServerChannel クラスの新しいインスタンスを初期化します。
public:
HttpServerChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider);
public HttpServerChannel(System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Http.HttpServerChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IServerChannelSinkProvider -> System.Runtime.Remoting.Channels.Http.HttpServerChannel
Public Sub New (properties As IDictionary, sinkProvider As IServerChannelSinkProvider)
パラメーター
- properties
- IDictionary
現在のチャネルの構成情報を保持するチャネル プロパティの IDictionary 。
- sinkProvider
- IServerChannelSinkProvider
HttpServerChannelの新しいインスタンスで使用するIServerChannelSinkProvider。
例外
構成プロパティの形式が正しくありません。
例
次のコード例は、このコンストラクターの使用方法を示しています。
System::Collections::Hashtable^ properties = gcnew System::Collections::Hashtable;
properties->default[ L"port" ] = 9090;
IServerChannelSinkProvider^ sinkProvider = nullptr;
HttpServerChannel^ serverChannel = gcnew HttpServerChannel( properties,sinkProvider );
System.Collections.Hashtable properties =
new System.Collections.Hashtable();
properties["port"] = 9090;
IServerChannelSinkProvider sinkProvider = null;
HttpServerChannel serverChannel = new HttpServerChannel(
properties, sinkProvider);
注釈
チャネル構成プロパティの詳細については、「 チャネルとフォーマッタの構成プロパティ」を参照してください。
シンク機能が不要な場合は、 sinkProvider パラメーターを null に設定します。
こちらもご覧ください
適用対象
HttpServerChannel(String, Int32)
指定した名前で HttpServerChannel クラスの新しいインスタンスを初期化し、指定したポートでリッスンします。
public:
HttpServerChannel(System::String ^ name, int port);
public HttpServerChannel(string name, int port);
new System.Runtime.Remoting.Channels.Http.HttpServerChannel : string * int -> System.Runtime.Remoting.Channels.Http.HttpServerChannel
Public Sub New (name As String, port As Integer)
パラメーター
- name
- String
チャネルの名前。
- port
- Int32
チャネルがリッスンするポート。
例
次のコード例は、このコンストラクターの使用方法を示しています。
String^ name = L"RemotingServer";
int port = 9090;
HttpServerChannel^ serverChannel = gcnew HttpServerChannel( name,port );
string name = "RemotingServer";
int port = 9090;
HttpServerChannel serverChannel =
new HttpServerChannel(name, port);
注釈
このコンストラクターは、name パラメーターを使用してChannelName プロパティを設定します。 複数のチャネルを登録する場合は、各チャネルに一意の名前が必要です。
使用可能なポートを動的に割り当てることを要求するには、 port パラメーターを 0 (ゼロ) に設定します。
適用対象
HttpServerChannel(String, Int32, IServerChannelSinkProvider)
指定したポートでリッスンし、指定したシンクを使用する、指定したポートで HttpServerChannel クラスの新しいインスタンスを初期化します。
public:
HttpServerChannel(System::String ^ name, int port, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider);
public HttpServerChannel(string name, int port, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Http.HttpServerChannel : string * int * System.Runtime.Remoting.Channels.IServerChannelSinkProvider -> System.Runtime.Remoting.Channels.Http.HttpServerChannel
Public Sub New (name As String, port As Integer, sinkProvider As IServerChannelSinkProvider)
パラメーター
- name
- String
チャネルの名前。
- port
- Int32
チャネルがリッスンするポート。
- sinkProvider
- IServerChannelSinkProvider
チャネルによって使用される IServerChannelSinkProvider 。
例
次のコード例は、このコンストラクターの使用方法を示しています。
String^ name = L"RemotingServer";
int port = 9090;
IServerChannelSinkProvider^ sinkProvider = nullptr;
HttpServerChannel^ serverChannel = gcnew HttpServerChannel(
name,port,sinkProvider );
string name = "RemotingServer";
int port = 9090;
IServerChannelSinkProvider sinkProvider = null;
HttpServerChannel serverChannel =
new HttpServerChannel(name, port, sinkProvider);
注釈
このコンストラクターは、name パラメーターを使用してChannelName プロパティを設定します。
使用可能なポートを動的に割り当てることを要求するには、 port パラメーターを 0 (ゼロ) に設定します。
シンク機能が不要な場合は、 sinkProvider パラメーターを null に設定します。