Assembly: System.ServiceModel (in system.servicemodel.dll)
IAsyncResult BeginWaitForMessage ( TimeSpan timeout, AsyncCallback callback, Object state )
function BeginWaitForMessage ( timeout : TimeSpan, callback : AsyncCallback, state : Object ) : IAsyncResult
The Timespan that specifies the interval of time to wait for a message to become available.
The AsyncCallback 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.
Return ValueThe IAsyncResult that references the asynchronous operation to wait for a message to arrive.
Use the asynchronous BeginWaitForMessage method if you need the application processing to continue without waiting for the message to arrive. Use the synchronous WaitForMessage 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 timeout.
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.Notes to Implementers: The operation returns false if the specified timeout is exceeded, not a timeout exception.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.