IDuplexSession.CloseOutputSession Method (TimeSpan)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Terminates the outbound session that indicates that no more messages will be sent from this endpoint on the channel associated with the session within a specified interval of time.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Sub CloseOutputSession ( _
    timeout As TimeSpan _
)
void CloseOutputSession(
    TimeSpan timeout
)

Parameters

  • timeout
    Type: System.TimeSpan
    The TimeSpan that specifies the interval of time within which the operation must complete.

Remarks

Calling CloseOutputSession(TimeSpan) signals to the other side of the session that it should return nulla null reference (Nothing in Visual Basic) from any outstanding or subsequent calls made to Receive. CloseOutputSession is idempotent, so calling it again has no effect.

Terminating the outbound session does not affect the incoming session and so makes no statement about the ability to receive messages on the session associated with the input channel.

Notes to Implementers

CloseOutputSession is a session method that can interact with the IDuplexSessionChannel that owns the session. In particular, if your session lifetime is put together with your channel lifetime (like it is with TCP and reliable session and security):

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.