Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITarget::send Method

 

When overridden in a derived class, synchronously passes a message to the target block.

virtual message_status send(
   _Inout_ message<_Type> * _PMessage,
   _Inout_ ISource<_Type> * _PSource
) = 0;

_PMessage

A pointer to the message object.

_PSource

A pointer to the source block offering the message.

A message_status indication of what the target decided to do with the message.

The method throws an invalid_argument exception if either the _PMessage or _PSource parameter is NULL.

Using the send method outside of message initiation and to propagate messages within a network is dangerous and can lead to deadlock.

When send returns, the message has either already been accepted, and transferred into the target block, or it has been declined by the target.

Requirements

Header: agents.h

Namespace: concurrency

Show:
© 2016 Microsoft