libcaf  0.15.5
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
caf::stream_msg Struct Reference

Stream communication messages for handshaking, ACKing, data transmission, etc. More...

#include <stream_msg.hpp>

Inherits boxing_type.

Classes

struct  ack_batch
 Cumulatively acknowledges received batches and signalizes new demand from a sink to its source. More...
 
struct  ack_open
 Acknowledges a previous open message and finalizes a stream handshake. More...
 
struct  batch
 Transmits stream data. More...
 
struct  close
 Orderly shuts down a stream after receiving an ACK for the last batch. More...
 
struct  drop
 Informs a source that a sink orderly drops out of a stream. More...
 
struct  forced_close
 Propagates a fatal error from sources to sinks. More...
 
struct  forced_drop
 Propagates a fatal error from sinks to sources. More...
 
struct  open
 Initiates a stream handshake. More...
 

Public Types

enum  flow_label {
  flows_downstream,
  flows_upstream
}
 A flow label characterizes nested types. More...
 
using content_alternatives = detail::type_list< open, ack_open, batch, ack_batch, close, drop, forced_close, forced_drop >
 Lists all possible options for the payload.
 
using content_type = variant< open, ack_open, batch, ack_batch, close, drop, forced_close, forced_drop >
 Stores one of content_alternatives.
 

Public Member Functions

template<class T >
 stream_msg (const stream_id &id, actor_addr addr, T &&x)
 
 stream_msg (stream_msg &&)=default
 
 stream_msg (const stream_msg &)=default
 
stream_msgoperator= (stream_msg &&)=default
 
stream_msgoperator= (const stream_msg &)=default
 

Public Attributes

stream_id sid
 ID of the affected stream.
 
actor_addr sender
 Address of the sender. More...
 
content_type content
 Palyoad of the message.
 

Detailed Description

Stream communication messages for handshaking, ACKing, data transmission, etc.

Member Enumeration Documentation

A flow label characterizes nested types.

Enumerator
flows_downstream 

Identifies content types that only flow downstream.

flows_upstream 

Identifies content types that only flow upstream.

Member Data Documentation

actor_addr caf::stream_msg::sender

Address of the sender.

Identifies the up- or downstream actor sending this message. Note that abort messages can get send after sender already terminated. Hence, current_sender() can be nullptr, because no strong pointers can be formed any more and receiver would receive an anonymous message.


The documentation for this struct was generated from the following file: