IReplyChannel.BeginReceiveRequest Método
Definição
Inicia uma operação assíncrona para receber uma solicitação disponível.Begins an asynchronous operation to receive an available request.
Sobrecargas
| BeginReceiveRequest(AsyncCallback, Object) |
Inicia uma operação assíncrona para receber uma solicitação disponível com um tempo limite padrão.Begins an asynchronous operation to receive an available request with a default timeout. |
| BeginReceiveRequest(TimeSpan, AsyncCallback, Object) |
Inicia uma operação assíncrona para receber uma solicitação disponível com um tempo limite especificado.Begins an asynchronous operation to receive an available request with a specified timeout. |
BeginReceiveRequest(AsyncCallback, Object)
Inicia uma operação assíncrona para receber uma solicitação disponível com um tempo limite padrão.Begins an asynchronous operation to receive an available request with a default timeout.
public:
IAsyncResult ^ BeginReceiveRequest(AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginReceiveRequest (AsyncCallback callback, object state);
abstract member BeginReceiveRequest : AsyncCallback * obj -> IAsyncResult
Public Function BeginReceiveRequest (callback As AsyncCallback, state As Object) As IAsyncResult
Parâmetros
- callback
- AsyncCallback
O representante de AsyncCallback que recebe a notificação do recebimento assíncrono que uma operação de solicitação conclui.The AsyncCallback delegate that receives the notification of the asynchronous receive that a request operation completes.
- state
- Object
Um objeto, especificado pelo aplicativo, que contém informações de estado associadas ao recebimento assíncrono de uma operação de solicitação.An object, specified by the application, that contains state information associated with the asynchronous receive of a request operation.
Retornos
O IAsyncResult que referencia o recebimento assíncrono da solicitação.The IAsyncResult that references the asynchronous reception of the request.
Exemplos
O código a seguir ilustra como implementar esse método:The following code illustrates how to implement this method:
public IAsyncResult BeginReceiveRequest(AsyncCallback callback, object state)
{
return BeginReceiveRequest(DefaultReceiveTimeout, callback, state);
}
Comentários
O BeginReceiveRequest(AsyncCallback, Object) método implementa o padrão padrão para invocar de ReceiveRequest() forma assíncrona.The BeginReceiveRequest(AsyncCallback, Object) method implements the standard pattern for invoking ReceiveRequest() asynchronously. O tempo limite padrão é 1 minuto.The default timeout is 1 minute. Se um tempo limite de recebimento for definido na associação usada para configurar a conexão, esse valor será usado.If a receive timeout is set on the binding used to configure the connection, then that value is used. Use BeginReceiveRequest(TimeSpan, AsyncCallback, Object) se você quiser especificar um tempo limite explícito com a chamada que substitui esses outros valores.Use BeginReceiveRequest(TimeSpan, AsyncCallback, Object) if you want to specify an explicit timeout with the call that overrides these other values.
Se a mensagem de solicitação recebida for maior que o tamanho máximo de mensagem permitido pela Associação sendo usada, um QuotaExceededException será gerado.If the request message received is larger that the maximum message size allowed by the binding being used, a QuotaExceededException is thrown. O tamanho máximo da mensagem é definido pela MaxReceivedMessageSize propriedade.The maximum message size is set by the MaxReceivedMessageSize property. O valor padrão é 65536 bytes.The default value is 65536 bytes.
Aplica-se a
BeginReceiveRequest(TimeSpan, AsyncCallback, Object)
Inicia uma operação assíncrona para receber uma solicitação disponível com um tempo limite especificado.Begins an asynchronous operation to receive an available request with a specified timeout.
public:
IAsyncResult ^ BeginReceiveRequest(TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginReceiveRequest (TimeSpan timeout, AsyncCallback callback, object state);
abstract member BeginReceiveRequest : TimeSpan * AsyncCallback * obj -> IAsyncResult
Public Function BeginReceiveRequest (timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult
Parâmetros
- timeout
- TimeSpan
O TimeSpan que especifica o intervalo de tempo de espera para o recebimento de uma solicitação disponível.The TimeSpan that specifies the interval of time to wait for the reception of an available request.
- callback
- AsyncCallback
O representante de AsyncCallback que recebe a notificação do recebimento assíncrono que uma operação de solicitação conclui.The AsyncCallback delegate that receives the notification of the asynchronous receive that a request operation completes.
- state
- Object
Um objeto, especificado pelo aplicativo, que contém informações de estado associadas ao recebimento assíncrono de uma operação de solicitação.An object, specified by the application, that contains state information associated with the asynchronous receive of a request operation.
Retornos
O IAsyncResult que referencia o recebimento assíncrono da solicitação.The IAsyncResult that references the asynchronous reception of the request.
Exemplos
O código a seguir ilustra como implementar esse método:The following code illustrates how to implement this method:
public IAsyncResult BeginReceiveRequest(TimeSpan timeout, AsyncCallback callback, object state)
{
ReceiveRequestAsyncResult result = new ReceiveRequestAsyncResult(this, timeout, callback, state);
result.Begin();
return result;
}
Comentários
O BeginReceiveRequest(TimeSpan, AsyncCallback, Object) método implementa o padrão padrão para invocar de ReceiveRequest(TimeSpan) forma assíncrona.The BeginReceiveRequest(TimeSpan, AsyncCallback, Object) method implements the standard pattern for invoking ReceiveRequest(TimeSpan) asynchronously. O tempo limite definido neste método substitui um tempo limite de recebimento definido na associação que é usada para configurar a conexão.The timeout set on this method overrides a receive timeout set on the binding that is used to configure the connection.
Se a mensagem de solicitação recebida for maior que o tamanho máximo de mensagem permitido pela Associação sendo usada, um QuotaExceededException será gerado.If the request message received is larger that the maximum message size allowed by the binding being used, a QuotaExceededException is thrown. O tamanho máximo da mensagem é definido pela MaxReceivedMessageSize propriedade.The maximum message size is set by the MaxReceivedMessageSize property. O valor padrão é 65536 bytes.The default value is 65536 bytes.