TcpServerChannel.StopListening Method (Object)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Instructs the current channel to stop listening for requests.

Namespace:   System.Runtime.Remoting.Channels.Tcp
Assembly:  System.Runtime.Remoting (in System.Runtime.Remoting.dll)

[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure, 
	Infrastructure = true)]
public void StopListening(
	object data


Type: System.Object

Optional state information for the channel.

Use this method to stop listening on a channel. To restart listening, use the StartListening method.

If your channel uses a dynamically assigned port number, your port number might change when you restart listening.

The data object can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, set data to null.

.NET Framework
Available since 1.1
Return to top