WPILibC++
unspecified
|
Public Types | |
typedef std::function< bool(NetworkConnection &conn, std::function< std::shared_ptr< Message >)> | get_msg |
typedef std::function< bool(NetworkConnection &conn, std::function< std::shared_ptr< Message >)> std::function< void(wpi::ArrayRef< std::shared_ptr< Message >>)> send_msgs | HandshakeFunc |
typedef std::function< void(std::shared_ptr< Message > msg, NetworkConnection *conn)> | ProcessIncomingFunc |
typedef std::vector< std::shared_ptr< Message > > | Outgoing |
typedef wpi::ConcurrentQueue< Outgoing > | OutgoingQueue |
![]() | |
enum | State { kCreated, kInit, kHandshake, kSynchronized, kActive, kDead } |
Public Member Functions | |
NetworkConnection (unsigned int uid, std::unique_ptr< wpi::NetworkStream > stream, IConnectionNotifier ¬ifier, wpi::Logger &logger, HandshakeFunc handshake, Message::GetEntryTypeFunc get_entry_type) | |
void | set_process_incoming (ProcessIncomingFunc func) |
void | Start () |
void | Stop () |
ConnectionInfo | info () const override |
bool | active () const |
wpi::NetworkStream & | stream () |
void | QueueOutgoing (std::shared_ptr< Message > msg) override |
void | PostOutgoing (bool keep_alive) override |
unsigned int | uid () const |
unsigned int | proto_rev () const override |
void | set_proto_rev (unsigned int proto_rev) override |
State | state () const override |
void | set_state (State state) override |
std::string | remote_id () const |
void | set_remote_id (StringRef remote_id) |
uint64_t | last_update () const |
NetworkConnection (const NetworkConnection &)=delete | |
NetworkConnection & | operator= (const NetworkConnection &)=delete |
![]() | |
INetworkConnection (const INetworkConnection &)=delete | |
INetworkConnection & | operator= (const INetworkConnection &)=delete |