⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc2188.txt

📁 <VC++网络游戏建摸与实现>源代码
💻 TXT
📖 第 1 页 / 共 5 页
字号:
Banan, et. al                Informational                     [Page 25]RFC 2188                          ESRO                    September 1997      o Invoke-Reference-Number:  Uniquely identifies the invocation        between the two peers.  This is a PDU field with a length of 8        bits (see section 4.4).      o Invoke-ID-Parameter:  Uniquely identifies the invocation to the        service user.  This Invoke-ID-Parameter is a combination of the        Invoke-Reference-Number described above and the invoker address,        performer address, and the SAP Selector.   The provider communicates the Invoke-ID-Parameter to the invoker of   the INVOKE service through the ESROS-INVOKE-P.confirm primitive.   The Invoke-Reference-Number distinguishes several invocations of the   service in progress (asynchronous operations).  It is also used as   segment identifier when a Service Data Unit (SDU) is transferred   using segmentation and reassembly.  The ESROS provider may begin to   reuse the Invoke-Reference-Number values whenever it chooses, subject   to the constraint that it may not reuse an Invoke-Reference-Number   value that was previously assigned to an invocation of the service   for which it expects, but has not yet received, a reply.  In other   words the provider does not reuse a previously used Invoke-   Reference-Number unless the corresponding service is fully completed.   The same value of the Invoke-Reference-Number can be reused to   identify the invocation between different peer entities.  In that   case, the combination of the peer entity's address and the Invoke-   Reference-Number guarantees unique identification of each invocation.4.2.4  Functional Unit Selection Procedure   When an ESRO Services user binds to an ESRO SAP, it associates its   SAP descriptor to 3-Way Handshake Functional Unit or 2-Way Handshake   Functional Unit.   Based on the Functional Unit associated with SAP, provider selects   the corresponding Functional Unit for all Invoke Requests or PDUs   addressed to that SAP.4.3  Connectionless PDU Transfer For Small PDUs4.3.1  Overview   PDUs sent by UDP use port ESRO_CL_PORT. PDUs carried by UDP are   restricted to CLRO_SMALL_PDU_MAX_SIZE bytes (see 4.6.1)   Each PDU is encapsulated in a single UDP datagram.Banan, et. al                Informational                     [Page 26]RFC 2188                          ESRO                    September 1997   For PDUs larger than CLRO_SMALL_PDU_MAX_SIZE but smaller than   CLRO_SEGMENTED_PDU_MAX_SIZE bytes (see 4.6.1), segmentation and   reassembly is used and each segment is transmitted in a UDP datagram.   PDUs sent using UDP may be lost, and hence a retransmission strategy   is defined.  When a PDU is segmented, the retransmission strategy is   not applied to individual segments (i.e., loss of one segment results   in retransmission of the whole SDU).   The optimal UDP retransmission policy will vary with the performance   of the network and the needs of the transmitter, but the following   are considered:   The retransmission interval should be based on prior statistics if   possible.  Too aggressive retransmission can easily slow response   time of the network at large.  Depending on how well connected the   invoker is to its performer, the minimum retransmission interval   should be RETRANSMISSION_INTERVAL (see 4.6.2) seconds.   Delivery of PDUs is asynchronous which means the ESROS does not wait   for the result of a transmitted PDU and continues delivering the next   PDUs.       ______________________________________________________       |From Idle to:                      |Event            |       |___________________________________|_________________|       |CL-Invoker Transition Diagram      |ESRO-INVOKE.req  |       | 2-way Handshake (Connectionless)  |                 |       |___________________________________|_________________|       |CL-Invoker Transition Diagram      |ESRO-INVOKE.req  |       | 3-way Handshake (Connectionless)  |                 |       |___________________________________|_________________|       |CL-Performer Transition Diagram    |INVOKE-PDU       |       | 3-way Handshake (Connectionless)  |                 |       |___________________________________|_________________|       |CL-Performer Transition Diagram    |INVOKE-PDU       |       | 2-way Handshake  (Connectionless) |                 |       |___________________________________|_________________|                Table 10:  ESROS Finite State Machine   This section describes the ESROS protocols in terms of state   diagrams.  The ESROS Finite State Machine is expressed as four   separate transition diagrams.  This is illustrated in Table 10.Banan, et. al                Informational                     [Page 27]RFC 2188                          ESRO                    September 1997   Details of each of the two transition diagrams for connectionless   transmission and different handshakings are described in the   following sections.  The state diagrams show the state, the events,   the actions taken and the resultant state.The ESROS state transition   diagrams for connectionless data transmission are presented in Table   11, Table 12, Table 13, and Table 14.   Transitions are identified by numbers on the state diagrams.  The   corresponding actions are listed next to each table.4.3.2  3-Way Handshake Functional Unit   This unit implements the Acknowledged Result model of ESRO Services.   3-Way handshaking is used in this unit.   The RESULT.confirm and ERROR.confirm primitives on performer are   generated when ESRO-ACK-PDU is received.   The FAILURE.indication on performer side is resulted from remote or   local failures.  Not receiving ESRO-ACK-PDU or local failure can   generate FAILURE.indication primitive.   The FAILURE.indication on invoker side is generated if a local   failure happens or a ESRO-FAILURE-PDU is received.Banan, et. al                Informational                     [Page 28]RFC 2188                          ESRO                    September 1997   _______________________________________________________________   |      State      |STA01     |STA02      |STA03    |STA04     |   |                 |CL Invoker|Invoke PDU |ACK-PDU  |Invoker   |   |Event            |Start     |Send       |Send     |RefNu Wait|   |-----------------+----------+-----------+---------+----------+   |U: INVOKE.request|(1) STA02 |           |         |          |   |-----------------+----------+-----------+---------+----------+   |T: INVOKE PDU    |          |(2) STA02  |         |          |   | Retransmit      |          |           |         |          |   |-----------------+----------+-----------+---------+----------+   |T: Last Timer    |          |(3) STA04  |         |          |   |-----------------+----------+-----------+---------+----------+   |P: Result-PDU    |          |           |         |(9) STA04 |   |-----------------+----------+-----------+---------+----------+   |P: Failure-PDU   |          |(5) STA04  |         |          |   |-----------------+----------+-----------+---------+----------+   |P: ACK-PDU       |          |(6) STA02  |         |          |   | (Hold On)       |          |           |         |          |   |-----------------+----------+-----------+---------+----------+   |P: Duplicate     |          |           |(7) STA03|          |   |  Result-PDU     |          |           |         |          |   |-----------------+----------+-----------+---------+----------+   |T: RefNu Timer   |          |           |         |(8) STA01 |   |-----------------+----------+-----------+---------+----------+   |P: Result-PDU    |          |(4) STA03  |         |          |   |-----------------+----------+-----------+---------+----------+   |T: Inactivity    |          |           |(10)     |          |   | Timer           |          |           |STA04    |          |   |_________________|__________|___________|_________|__________|   Table 11:  ESROS State Transition Diagram-Connectionless Transmission,   3-Way HS. P = Protocol, T = Timer, U = User, I = Internal.   The transmission of INVOKE, RESULT, and ERROR SDUs can be in a single   PDU (when it fits in one UDP) or a sequence of segment PDUs.   3-Way Handshake Connectionless Transmission:  Invoker   For each transition number in the state diagram Table 11, the   corresponding actions are listed below:    1. INVOKE.request:      o Assign Invoke-ID.Banan, et. al                Informational                     [Page 29]RFC 2188                          ESRO                    September 1997      o Issue ESROS-INVOKE-P.confirm primitive.      o Assign invoke reference number.      o Send operation in one ESRO-INVOKE-PDU or in segmented INVOKE-        PDUs depending on the size of the operation.      o Initialize retransmission counter.      o Initialize retransmission timer.    2. Invoke PDU Retransmit:      o Retransmit operation in one ESRO-INVOKE-PDU or segmented PDUs        while number of retransmissions is less than        MAX_RETRANSMISSIONS.      o Increment the retransmission counter.  When MAX_RETRANSMISSIONS        reached, start LAST_TIMER, otherwise initialize retransmission        timer.    3. Last Timer:      o Issue ESROS-FAILURE.indication primitive.      o Initialize reference number timer.    4. ESRO-RESULT-PDU or ESRO-ERROR-PDU (or reassembled ESRO-       RESULT-SEGMENTED-PDU or ESRO-ERROR-SEGMENTED-PDU when the PDU is       received in segmented format):      o Send ESRO-ACK-PDU.      o Issue ESROS-RESULT.indication or ESROS-ERROR.indication        primitive.      o Initialize inactivity timer.    5. ESRO-FAILURE-PDU:      o Issue ESROS-FAILURE.indication primitive with User not        Responding failure cause.      o Initialize reference number timer.Banan, et. al                Informational                     [Page 30]RFC 2188                          ESRO                    September 1997    6. ESRO-ACK-PDU (Hold on):      o For future use (no action).    7. Duplicate ESRO-RESULT-PDU or ESRO-ERROR-PDU:      o Initialize inactivity timer (Ignore PDU).      o Send ESRO-ACK-PDU.    8. Invoke reference number timer:      o Release the invoke reference number.    9. ESRO-RESULT-PDU or ESRO-ERROR-PDU:      o Reset Invoke reference number timer.    10. Inactivity timer:      o Initialize reference number timer.   On receipt of an ESROS-INVOKE.request, ESROS provider generates an   Invoke- Reference-Number and an Invoke-ID (see Section 4.2.3).  The   provider issues an ESROS-INVOKE-P.confirm primitive and passes the   Invoke-ID to the invoker.   The ESROS provider initiates the timer for the Invoke-ID and   transmits the PDU. Based on the size of SDU, if segmentation is   required, the SDU is segmented and transmitted in a sequence of   segmented PDUs.  If the ESRO-RESULT-PDU or ESRO-ERROR-PDU associated   with the invoke ID is not received within the   INVOKE_PDU_RETRANSMISSION_INTERVAL (see 4.6.2) period, the SDU is   retransmitted (in one PDU or segmented and transmitted in a sequence   of segment PDUs).  The retransmission is repeated for a maximum of   MAX_RETRANSMISSIONS unless an ESRO-RESULT-PDU or ESRO-ERROR-PDU is   received.   If the ESRO-RESULT-PDU or ESRO-ERROR-PDU is received in a segmented   format, the reassembly process reassembles the sequence of segment   PDUs.   In the case that the Hold-on ESRO-ACK-PDU is received from the   performer, the provider stops retransmitting the ESRO-INVOKE-PDU and   waits for the ESRO- RESULT-PDU or ESRO-ERROR-PDU for a period equal   to the multiplication of INVOKE_PDU_RETRANSMISSION_INTERVAL (see   4.6.2) and MAX_RETRANSMISSIONS (see 4.6.2, for future use).Banan, et. al                Informational                     [Page 31]RFC 2188                          ESRO                    September 1997   In the case that the ESRO-INVOKE-PDU is sent MAX_RETRANSMISSIONS (see   4.6.2) times and no ESRO-RESULT-PDU or ESRO-ERROR-PDU is received,   the ESROS provider sends an ESROS-FAILURE.indication primitive, with   the Invoke-ID of the

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -