Expecting Different Types of Messages
receiveOnly() can expect only one type of message.
receive(), on the other hand, can wait for more than one type of message. It dispatches messages to message handling delegates. When a message arrives, it is compared to the message type of each delegate. The delegate that matches the type of the particular message handles it.
For example, the following
receive() call specifies two message handlers that handle messages of types