Listen method attributes

The Listen method listens for events and returns when an event has occurred. The Listen method uses the attributes Resource ID, Wildcard, and Userdata.

A message that is an event contains one to three of the following attributes that you set when a message is added to the collection.

Resource ID
An identifier that uniquely identifies the message, file or buffer (for example, message ID, memory address, and file handle). The Resource ID is used in the Get method to actually retrieve the physical data.
Wildcard
If a property of the adapter contains a wildcard, the actual value that represents the wildcard is specified as an attribute of the message. The mpiExtractWildcard method can be called to get the value of the wildcard.
Userdata

The userdata attribute is provided so that any other data can be associated with the message. Some adapters actually get the data for the event during the Listen call. For example, messaging systems that do not permit non-destructive browsing. For these, the message data should be associated with the userdata attribute.

If userdata is provided, the adapter must provide a method to free up the memory used by the userdata. This method is of type MPI_PF_FREEUSERDATA which is defined as:
typedef void (*MPI_PF_FREEUSERDATA)(void *);