aether::netcode::generic_netcode< Marshalling, InterestPolicy > Class Template Reference

The state associated with a muxer thread. More...

#include <generic_netcode.hh>

Public Member Functions

 generic_netcode (const interest_policy_type &policy=interest_policy_type(), const marshalling_type &_factory=marshalling_type())
 
 generic_netcode (const generic_netcode &)=delete
 
void new_connection (void *muxer, void *connection, uint64_t id)
 Informs the netcode of a new connection. More...
 
void new_simulation_message (void *muxer, uint64_t worker_id, uint64_t tick, const void *data, size_t data_len)
 Informs the netcode of a new message from the simulation. More...
 
void notify_writable (void *muxer, uint64_t id)
 Notifies the netcode that the specified connection is writable. More...
 
void drop_connection (void *muxer, uint64_t id)
 Notifies the netcode that the specified connection has been dropped. More...
 

Detailed Description

template<typename Marshalling, typename InterestPolicy = generic_interest_policy>
class aether::netcode::generic_netcode< Marshalling, InterestPolicy >

The state associated with a muxer thread.

Constructor & Destructor Documentation

template<typename Marshaller , typename InterestPolicy >
aether::netcode::generic_netcode< Marshaller, InterestPolicy >::generic_netcode ( const interest_policy_type &  policy = interest_policy_type(),
const marshalling_type &  _factory = marshalling_type() 
)
template<typename Marshalling , typename InterestPolicy = generic_interest_policy>
aether::netcode::generic_netcode< Marshalling, InterestPolicy >::generic_netcode ( const generic_netcode< Marshalling, InterestPolicy > &  )
delete

Member Function Documentation

template<typename Marshaller , typename InterestPolicy >
void aether::netcode::generic_netcode< Marshaller, InterestPolicy >::drop_connection ( void *  muxer,
uint64_t  id 
)

Notifies the netcode that the specified connection has been dropped.

template<typename Marshaller , typename InterestPolicy >
void aether::netcode::generic_netcode< Marshaller, InterestPolicy >::new_connection ( void *  muxer,
void *  connection,
uint64_t  id 
)

Informs the netcode of a new connection.

Parameters
muxerthe muxer context
connectionthe opaque connection context
idan integer identifier for this connection
template<typename Marshaller , typename InterestPolicy >
void aether::netcode::generic_netcode< Marshaller, InterestPolicy >::new_simulation_message ( void *  muxer,
uint64_t  worker_id,
uint64_t  tick,
const void *  data,
size_t  data_len 
)

Informs the netcode of a new message from the simulation.

Parameters
muxerthe muxer context
worker_idthe id of the worker that sent the message
tickthe tick of the message
datathe raw message data
data_lenthe message length in bytes
template<typename Marshaller , typename InterestPolicy >
void aether::netcode::generic_netcode< Marshaller, InterestPolicy >::notify_writable ( void *  muxer,
uint64_t  id 
)

Notifies the netcode that the specified connection is writable.