Compartir a través de


HttpServerChannel Constructores

Definición

Inicializa una nueva instancia de la clase HttpServerChannel.

Sobrecargas

Nombre Description
HttpServerChannel()

Inicializa una nueva instancia de la clase HttpServerChannel.

HttpServerChannel(Int32)

Inicializa una nueva instancia de la HttpServerChannel clase que escucha en el puerto especificado.

HttpServerChannel(IDictionary, IServerChannelSinkProvider)

Inicializa una nueva instancia de la HttpServerChannel clase con las propiedades del canal y el receptor especificados.

HttpServerChannel(String, Int32)

Inicializa una nueva instancia de la HttpServerChannel clase con el nombre especificado y que escucha en el puerto especificado.

HttpServerChannel(String, Int32, IServerChannelSinkProvider)

Inicializa una nueva instancia de la HttpServerChannel clase en el puerto especificado con el nombre especificado, que escucha en el puerto especificado y usa el receptor especificado.

HttpServerChannel()

Inicializa una nueva instancia de la clase HttpServerChannel.

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

Se aplica a

HttpServerChannel(Int32)

Inicializa una nueva instancia de la HttpServerChannel clase que escucha en el puerto especificado.

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)

Parámetros

port
Int32

Puerto en el que escucha el canal.

Comentarios

Para solicitar que se asigne dinámicamente un puerto disponible, establezca el port parámetro en 0 (cero).

Se aplica a

HttpServerChannel(IDictionary, IServerChannelSinkProvider)

Inicializa una nueva instancia de la HttpServerChannel clase con las propiedades del canal y el receptor especificados.

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)

Parámetros

properties
IDictionary

De IDictionary las propiedades del canal que contienen la información de configuración del canal actual.

sinkProvider
IServerChannelSinkProvider

que IServerChannelSinkProvider se va a usar con la nueva instancia de .HttpServerChannel

Excepciones

Se ha aplicado un formato incorrecto a una propiedad de configuración.

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar este constructor.

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

Comentarios

Para obtener más información sobre las propiedades de configuración del canal, vea Propiedades de configuración de canal y formateador.

Si no necesita funcionalidad de receptor, establezca el sinkProvider parámetro nullen .

Consulte también

Se aplica a

HttpServerChannel(String, Int32)

Inicializa una nueva instancia de la HttpServerChannel clase con el nombre especificado y que escucha en el puerto especificado.

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)

Parámetros

name
String

Nombre del canal.

port
Int32

Puerto en el que escucha el canal.

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar este constructor.

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

Comentarios

Este constructor establece la ChannelName propiedad mediante el name parámetro . Si desea registrar más de un canal, cada canal debe tener un nombre único.

Para solicitar que se asigne dinámicamente un puerto disponible, establezca el port parámetro en 0 (cero).

Se aplica a

HttpServerChannel(String, Int32, IServerChannelSinkProvider)

Inicializa una nueva instancia de la HttpServerChannel clase en el puerto especificado con el nombre especificado, que escucha en el puerto especificado y usa el receptor especificado.

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)

Parámetros

name
String

Nombre del canal.

port
Int32

Puerto en el que escucha el canal.

sinkProvider
IServerChannelSinkProvider

que IServerChannelSinkProvider va a usar el canal.

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar este constructor.

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

Comentarios

Este constructor establece la ChannelName propiedad mediante el name parámetro .

Para solicitar que se asigne dinámicamente un puerto disponible, establezca el port parámetro en 0 (cero).

Si no necesita funcionalidad de receptor, establezca el sinkProvider parámetro nullen .

Se aplica a