共用方式為


3.3.4.1.2 Granting Credits to the Client

As described in section 3.3.1.1, the server maintains a list of message identifiers available for incoming requests. The total number of available message identifiers can change dynamically as the system runs, with the server granting credits based on some local policy.

Based on the CreditRequest specified in the SMB2 header of a client request, the server MUST determine how many credits it will grant the client on each request by using a vendor-specific algorithm as specified in section 3.3.1.2. The server MUST then place the number of credits granted in the CreditResponse field in the SMB2 header of the response.

The server consumes one credit for any request except for the SMB2 CANCEL Request. If the server implements the SMB 2.1 or SMB 3.x dialect family and the request is a multi-credit request, the server MUST consume multiple credits as specified in section 3.3.5.2.3. To maintain the same number of credits already granted, the server returns a value equal to the number of credits consumed by this command. To reduce or increase the number of credits granted, the server respectively returns a value less than or greater than the number of credits consumed by this command. 

For an asynchronously processed request, any credits to be granted MUST be granted in the interim response, as specified in section 3.3.4.2.<233>