Request/Response Communication請求/響應通信
One of the most common communication patterns is the request/ response pattern. One communication partner (in the following called the client) sends a request message, which is answered by another communication partner (the server).
最常見的通信模式之一是請求/響應模式。 客戶端發送請求消息,服務器端應答。
Client
- Construct the payload
- Set the Message ID based on the method the client wants to call
- Set the Length field
- Optionally set the Request ID to a unique number
- Set the Protocol Version according
- Set the Interface Version according to the interface definition
- Set the Message Type to Request (i.e. 0x00)
- Set the Return Code to 0x00

Server
- builds it header based on the header of the client ,and in addition
- Construct the payload
- Set the length to the 8 Bytes + new payload size
- Set the Message Type to RESPONSE (i.e. 0x80) or ERROR (i.e. 0x81)
- Set the Return Code

Mapping
For the response and error message the IP addresses and port number of the transport protocol shall match the request message.
對于Response和Error message,傳輸層的IP Address和Port口需要和Request message匹配


傳輸層協議TCP或UDP保持不變
