Export (0) Print
Expand All

3.1.5.1 Sending Upper Layer Messages

The processing specified in this section is to be used only when Connection.Role is "ESTABLISHED", to start or restart sending one or more new or previously deferred Data Transfer messages. The caller passes the Connection to use for the Send message, and zero or more new messages to be sent.

The new messages to be sent, if any, MUST be appended to the list of messages in the Connection.SendQueue. If there are no messages to be sent and Connection.SendImmediate is TRUE, a newly constructed Data Transfer Message MUST be added to Connection.SendQueue.

The credit processing specified in section 3.1.5.9 MUST be performed, and the CreditsGranted field of the first message in Connection.SendQueue MUST be incremented by the number of new credits returned.

For each message in Connection.SendQueue:

  • If Connection.SendCredits is 0, stop processing messages, and break the loop.

  • If Connection.SendCredits is 1 and the CreditsGranted field of the message is 0, then at least one credit MUST be granted to the peer to prevent deadlock. If the processing specified in section 3.1.5.9 returns zero, stop processing Sends, and break the loop. Otherwise, increment the CreditsGranted field of the current first message in Connection.SendQueue by the number of new credits returned.

  • The first message MUST be removed from Connection.SendQueue.

  • The value of Connection.SendCredits MUST be decremented by one.

  • The value of the CreditsRequested field of the message MUST be set to Connection.SendCreditTarget.

  • If Connection.KeepaliveRequested is "PENDING", the Flags field of the message MUST be set to SMB_DIRECT_RESPONSE_REQUESTED, Connection.KeepaliveRequested MUST be set to "SENT", and the Idle Connection Timer SHOULD<3> be set to an implementation-specific value. Otherwise, the Flags field of the message MUST be set to 0x0000.

  • If the message to be sent was provided with an optional remote memory token to be invalidated on the receiving peer, the token SHOULD be provided in an implementation-specific manner to the RDMA provider when sending. If sending of remote invalidation is not supported by the RDMA provider, the token MAY be ignored.

  • The message MUST be sent on the connection in an implementation-specific manner, and any error MUST be returned to the caller.

If Connection.SendQueue is empty, Connection.SendImmediate MUST be set to FALSE and success MUST be returned to the caller.

 
Show:
© 2014 Microsoft