Partager via


IChannelReceiver.StopListening(Object) Méthode

Définition

Commande au canal en cours d'arrêter l'écoute des demandes.

public:
 void StopListening(System::Object ^ data);
public void StopListening (object data);
[System.Security.SecurityCritical]
public void StopListening (object data);
abstract member StopListening : obj -> unit
[<System.Security.SecurityCritical>]
abstract member StopListening : obj -> unit
Public Sub StopListening (data As Object)

Paramètres

data
Object

Informations d'état facultatives pour le canal.

Attributs

Exceptions

L'appelant immédiat n'a pas d'autorisation d'accès à l'infrastructure.

Exemples

// Extract the channel URI and the remote well known object URI from the specified URL.
Console::WriteLine( "Parsed : {0}", myHttpServerChannel->Parse( String::Concat( myHttpServerChannel->GetChannelUri(), "/SayHello" ),  myString ) );
Console::WriteLine( "Remote WellKnownObject : {0}", myString );
Console::WriteLine( "Hit <enter> to stop listening..." );
Console::ReadLine();

// Stop listening to channel.
myHttpServerChannel->StopListening( myPort );
// Extract the channel URI and the remote well known object URI from the specified URL.
Console.WriteLine("Parsed : " +
               myHttpServerChannel.Parse(myHttpServerChannel.GetChannelUri()+
                                                      "/SayHello",out myString));
Console.WriteLine("Remote WellKnownObject : " + myString);
Console.WriteLine("Hit <enter> to stop listening...");
Console.ReadLine();
// Stop listening to channel.
myHttpServerChannel.StopListening((object)myPort);
' Extract the channel URI and the remote well known object URI from the specified URL.
Console.WriteLine("Parsed : " + _
   myHttpServerChannel.Parse(myHttpServerChannel.GetChannelUri() + "/SayHello", myString))
Console.WriteLine("Remote WellKnownObject : " + myString)
Console.WriteLine("Hit <enter> to stop listening...")
Console.ReadLine()
' Stop listening to channel.
myHttpServerChannel.StopListening(CType(myPort, Object))

Remarques

L’objet de données peut être utilisé pour passer l’état spécifique au canal.

S’applique à