We have a design as shown below, and I would like to receive opinions or protocols for the scenario below.
Layer1 --------------- | ^ ^ | (1) |(4) |(6) v | | Remote entity ---------------- --------------- Layer0-----------------(2)------------------------------->Layer0 Layer0<----------------(3)--------------------------------Layer0 Layer0<----------------(5)--------------------------------Layer0 1. New session request to remote entity. 2. Establish link + data(session request) 3. Link Establishment ongoing 4. Link Establishment pending 5. Link Established + data (session accepted) 6. session accepted.
If layer1 decides that it does not need the remote feature service between steps 4 and 6. ie, event 4 is received, and event 6 must still be received due to some error.
1) If it waits for event 6 and a release session occurs, or2) Layer1 must instruct Layer 0 to complete the connection establishment procedure immediately.
What is the right way?
The problem with (1) will be, although we know that we will end the session due to an error, we need to process other events before the event occurs6.
. , , .
- , , UNABLE_TO_COMPLY, . , .
UNABLE_TO_COMPLY
, , , - . , , , . , quit_on_failure , , , .
quit_on_failure
, ( , , ), , fail. - . - , .
fail
- () . 1, , nack - .
, -, . , - " ", . , . -.
4 ( ) ? , SYN-ACK/RST TCP, , ( ).
1) 6
IMHO, . , , . , . , , , .
2) Layer1 Layer 0
.
, 1 1, 4.
, 2 "".
, . , , , 2, , 5. (, UDP), .
"" . , 2, , ?
. , 5, 2? 3 5 (, )? , , ?
, . , , " " . , , , , , .
. , .
, ? , , , , 2 . - , , , 2.
1 0 . 0, . 1 .
For me, this is the simplest and most obvious thing, and it is the least problematic. As you said, you no longer need to handle state at level 1 because you will not need these other messages when you have already closed the connection.
Source: https://habr.com/ru/post/1713363/More articles:Iterating over model attributes when creating a template in Django - google-app-engineI need to write an Access 97.mdb file - ms-accesshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1713360/is-there-support-in-the-net-framework-to-map-net-data-types-to-their-corresponding-sqldbtype&usg=ALkJrhiVmAjHvMW84ZE_dOeVW00Q23D6agBoost unit test обнаружена ошибка в неправильном наборе тестов - c++Какая максимальная память Visual Studio может использовать на 32-битной ОС Windows Server 2003? - visual-studio-2008Is there a non-GPL Python Library for reading ID3 information from mp3? - pythonXSL: how to select unique nodes in a node set - xpathBlackberry Storm Emulator - TouchGesture events do not fire, how to make Swipe work? - touchWhen to handle an exception? - c #Does the index in a unique field in the table indicate the instant choice of a number (*)? If not, why? - sqlAll Articles