IncomingMessageManagerTTransactionAsync Method |
Namespace: Demo3D.Net
public Task TransactionAsync( SendMessageDelegateAsync sendMessageAsync, IncomingMessageManagerTMessageHandler response, bool waitForResponse, int waitTimeoutMs, CallbackContext callbackContext = CallbackContext.CallerContext )
Exceptions:
This method may throw exceptions under different circumstances, depending on the configuration and the parameters passed to this call and to previous calls. If a handler throws an exception then the exception may be reported here. But if (for example) waitForResponse is false then the exception may be reported in the next call to this method, even though it does not relate to that transaction.
Best practice is for a handler not to throw exceptions, but rather to catch and handle the exceptions itself.
Timeouts:
It may still be necessary to pass a non-zero timeout in waitTimeoutMs even if waitForResponse is false. Although waitForResponse false implies that this method should not wait, and therefore a timeout is not required, there are circumstances when it will wait.
Depending on the configuration this method may be subject to flow control. For example if the configuration is RespondBehind, then we can't send this request until we've received the reply to the previous request, and this call will need to wait for that reply before it can send.