Freigeben über


IOutputChannel.Send Method (Message, TimeSpan)

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

Sends a message on the current output channel within a specified interval of time.

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

Syntax

'Declaration
Sub Send ( _
    message As Message, _
    timeout As TimeSpan _
)
void Send(
    Message message,
    TimeSpan timeout
)

Parameters

  • timeout
    Type: System.TimeSpan
    The Timespan that specifies how long the send operation has to complete before timing out.

Remarks

The destination for messages sent on an output channel is specified at channel creation time.

The Send() method does not guarantee the delivery of message to the remote endpoint. An implementation of IOutputChannel can silently drop messages for a variety of reasons. There may be no more buffer room, for example. If delivery guarantees are required, use IOutputSessionChannel.

Passing the message into the output channel causes the message to be accessed. After you call Send(), you can no longer inspect the message or call Close on the message.

Notes to Implementers

The operation should throw a TimeoutException if the specified timeout is exceeded.

Examples

The following code shows how to implement this method.

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.