System.ServiceModel 4.0.0.0 System.ServiceModel.Channels.IChannel

The contract includes synchronous and asynchronous variants of receive, try-to-receive and wait-for-a-message functionality.

The pull model is used typically with an to receive messages: you call (to "pull" a message out of the channel) and then wait for a message to arrive. An alternative usage pattern is to call or , and then call . This approach is common for transactional usages where you start the transaction between the calls to and .

An is not necessarily bound to a single sender. Other channels and channel interfaces can provide a correlation between particular senders and an , but the base contract makes no such restriction. An implementation can create a new for each message or reuse the same for multiple messages and senders.

Defines the interface that a channel must implement to receive a message.

- Method
  4.0.0.0
  System.IAsyncResult `` ``

  Use the asynchronous method when you want the application processing to continue without waiting for the request to be received. Use the synchronous method when it is acceptable for the current thread to be blocked until the request message is received or the interval of time specified by the has been exceeded. The asynchronous operation is available with or without an explicit timeout.

  This method receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until a message becomes available in the channel.

  Begins an asynchronous operation to receive a message that has a state object associated with it.

  The that references the asynchronous message reception.

  The delegate that receives the notification of the asynchronous operation completion. An object, specified by the application, that contains state information associated with the asynchronous operation.
- Method
  4.0.0.0
  System.IAsyncResult `` `` ``

  Use the asynchronous method when you want the application processing to continue without waiting for the request to be received. Use the synchronous method when it is acceptable for the current thread to be blocked until the request message is received or the interval of time specified by the has been exceeded. The asynchronous operation is available with or without an explicit timeout.

  The operation is not complete until either a message becomes available in the channel or the time out occurs.

  Begins an asynchronous operation to receive a message that has a specified time out and state object associated with it.

  The that references the asynchronous receive operation.

  The that specifies the interval of time to wait for a message to become available. The delegate that receives the notification of the asynchronous operation completion. An object, specified by the application, that contains state information associated with the asynchronous operation.
- Method
  4.0.0.0
  System.IAsyncResult `` `` ``

  Use the asynchronous method when you want the application processing to continue without waiting. Use the synchronous method when it is acceptable for the current thread to be blocked while it replies to the request message or until the timeout interval is exceeded.

  The operation is not complete until either a message becomes available in the channel or the timeout occurs.

  If you are going to handle timeouts and not just re-throw or wrap the , then you should call instead of .

  If you are not going to treat timeouts specially then just call , otherwise you lose error information.

  Begins an asynchronous operation to receive a message that has a specified time out and state object associated with it.

  The that references the asynchronous receive operation.

  The that specifies the interval of time to wait for a message to become available. The delegate that receives the notification of the asynchronous operation completion. An object, specified by the application, that contains state information associated with the asynchronous operation.
- Method
  4.0.0.0
  System.IAsyncResult `` `` ``

  Use the asynchronous method if you need the application processing to continue without waiting for the message to arrive. Use the synchronous method when it is acceptable for the current thread to be blocked while it waits for a message to arrive in the queue. The thread is blocked up to the specified .

  This method receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until either a message becomes available in the channel or the time out occurs.

  Begins an asynchronous wait-for-a-message-to-arrive operation that has a specified time out and state object associated with it.

  The that references the asynchronous operation to wait for a message to arrive.

  The that specifies the interval of time to wait for a message to become available. The delegate that receives the notification of the asynchronous operation completion. An object, specified by the application, that contains state information associated with the asynchronous operation.
- Method
  4.0.0.0
  System.ServiceModel.Channels.Message `` To be added.

  Completes an asynchronous operation to receive a message.

  The received.

  The returned by a call to one of the methods.
- Method
  4.0.0.0
  System.Boolean `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Boolean `` To be added.

  Completes the specified asynchronous wait-for-a-message operation.

  true if a message has arrived before the has been exceeded; otherwise false.

  The that identifies the operation to finish, and from which to retrieve an end result.
- Property
  4.0.0.0
  System.ServiceModel.EndpointAddress To be added.

  If this input channel does not have a standalone address (for example, it is the input-side of a client-initiated TCP channel), then this property is null.

  This property can be used by higher-level channels for correlation purposes. For example, if a higher-level channel implements request-reply on top of a , it can use the property in the WS-Addressing ReplyTo header.

  Gets the address on which the input channel receives messages.

- Method
  4.0.0.0
  System.ServiceModel.Channels.Message

  Use the synchronous method when it is acceptable for the current thread to be blocked until it receives the request message or exceeds the interval of time specified by . Use the asynchronous method when you want the application processing to continue without waiting for the request to be received.

  The synchronous operation is available with or without an explicit timeout.

  If a message is not available, it blocks until one is available or until the timeout is exceeded.

  can be called multiple times or concurrently. Only one call can complete for each message received.

  Returns the message received, if one is available. If a message is not available, blocks for a default interval of time.

  The received.

- Method
  4.0.0.0
  System.ServiceModel.Channels.Message ``

  Use the synchronous method when it is acceptable for the current thread to be blocked until it receives the request message or exceeds the interval of time specified by . Use the asynchronous method when you want the application processing to continue without waiting for the request to be received.

  The synchronous operation is available with or without an explicit timeout.

  If a message is not available, it blocks until one is available or until the timeout is exceeded.

  can be called multiple times or concurrently. Only one call can complete for each message received.

  Returns the message received, if one is available. If a message is not available, blocks for a specified interval of time.

  The received.

  The that specifies how long the receive operation has to complete before timing out and throwing a .
- Method
  4.0.0.0
  System.Boolean `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Boolean ``

  Calling does not result in a message being received or processed in any other way.

  The method exists primarily for transacted scenarios where the user wants to receive the message using a transaction. When using just normally for this, the user must create the transaction and then call and hope the message arrives before the transaction times out, which may not be possible.

  Instead, the user can call with whatever time out they want (even infinite), then when a message arrives they can open the transaction, call and be confident that they can get the message back before the transaction expires.

  This method is synchronous, so it blocks the current thread until a message is available or the time out occurs. Use when it is acceptable for the current thread to be blocked while it waits for a message to arrive in the queue. The thread is blocked up to the specified . If you need the application processing to continue without waiting, use the asynchronous method.

  Returns a value that indicates whether a message has arrived within a specified interval of time.

  true if a message has arrived before the has been exceeded; otherwise false.

  The specifies the maximum interval of time to wait for a message to arrive before timing out.