共用方式為


3.2.4.2 Application Reads from a Mailslot

The application provides the following data:

  • The name of the mailslot to read from, in the format specified in section 3.2.1.

The server MUST search MailslotList (section 3.2.1.1) for a mailslot whose Mailslot.Name field (section 3.2.1.2) matches the application-supplied name.

  • If a match is not found, the server MUST return an implementation-specific error to the caller.

  • If a match is found and Mailslot.MessageQueue (section 3.2.1.2) is empty, the server MAY block until a message arrives in the queue, wait for an implementation-specific timeout interval, or return an error.<16>

If a message is available in Mailslot.MessageQueue, the message MUST be deleted from the head of the queue and returned to the application.