Partager via


HttpServerChannel Constructeurs

Définition

Initialise une nouvelle instance de la classe HttpServerChannel.

Surcharges

Nom Description
HttpServerChannel()

Initialise une nouvelle instance de la classe HttpServerChannel.

HttpServerChannel(Int32)

Initialise une nouvelle instance de la HttpServerChannel classe qui écoute sur le port spécifié.

HttpServerChannel(IDictionary, IServerChannelSinkProvider)

Initialise une nouvelle instance de la HttpServerChannel classe avec les propriétés et le récepteur de canal spécifiés.

HttpServerChannel(String, Int32)

Initialise une nouvelle instance de la HttpServerChannel classe avec le nom donné et qui écoute sur le port spécifié.

HttpServerChannel(String, Int32, IServerChannelSinkProvider)

Initialise une nouvelle instance de la HttpServerChannel classe au niveau du port spécifié avec le nom donné, qui écoute sur le port spécifié et utilise le récepteur spécifié.

HttpServerChannel()

Initialise une nouvelle instance de la classe HttpServerChannel.

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

S’applique à

HttpServerChannel(Int32)

Initialise une nouvelle instance de la HttpServerChannel classe qui écoute sur le port spécifié.

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)

Paramètres

port
Int32

Port sur lequel le canal écoute.

Remarques

Pour demander qu’un port disponible soit attribué dynamiquement, définissez le port paramètre sur 0 (zéro).

S’applique à

HttpServerChannel(IDictionary, IServerChannelSinkProvider)

Initialise une nouvelle instance de la HttpServerChannel classe avec les propriétés et le récepteur de canal spécifiés.

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)

Paramètres

properties
IDictionary

Propriétés IDictionary du canal qui contiennent les informations de configuration du canal actuel.

sinkProvider
IServerChannelSinkProvider

À IServerChannelSinkProvider utiliser avec la nouvelle instance du HttpServerChannel.

Exceptions

Une propriété de configuration a été correctement mise en forme.

Exemples

L’exemple de code suivant montre comment utiliser ce constructeur.

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);

Remarques

Pour plus d’informations sur les propriétés de configuration de canal, consultez Propriétés de configuration du canal et du formateur.

Si vous n’avez pas besoin de fonctionnalités de récepteur, définissez le sinkProvider paramètre nullsur .

Voir aussi

S’applique à

HttpServerChannel(String, Int32)

Initialise une nouvelle instance de la HttpServerChannel classe avec le nom donné et qui écoute sur le port spécifié.

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)

Paramètres

name
String

Nom du canal.

port
Int32

Port sur lequel le canal écoute.

Exemples

L’exemple de code suivant montre comment utiliser ce constructeur.

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);

Remarques

Ce constructeur définit la ChannelName propriété à l’aide du name paramètre. Si vous souhaitez inscrire plusieurs canaux, chaque canal doit avoir un nom unique.

Pour demander qu’un port disponible soit attribué dynamiquement, définissez le port paramètre sur 0 (zéro).

S’applique à

HttpServerChannel(String, Int32, IServerChannelSinkProvider)

Initialise une nouvelle instance de la HttpServerChannel classe au niveau du port spécifié avec le nom donné, qui écoute sur le port spécifié et utilise le récepteur spécifié.

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)

Paramètres

name
String

Nom du canal.

port
Int32

Port sur lequel le canal écoute.

sinkProvider
IServerChannelSinkProvider

IServerChannelSinkProvider À utiliser par le canal.

Exemples

L’exemple de code suivant montre comment utiliser ce constructeur.

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);

Remarques

Ce constructeur définit la ChannelName propriété à l’aide du name paramètre.

Pour demander qu’un port disponible soit attribué dynamiquement, définissez le port paramètre sur 0 (zéro).

Si vous n’avez pas besoin de fonctionnalités de récepteur, définissez le sinkProvider paramètre nullsur .

S’applique à