Back to Site
Loading...
Searching...
No Matches
librats Namespace Reference

Namespaces

namespace  framer
 

Classes

struct  Address
 
class  DhtDiscovery
 
class  EventBus
 
class  FileTransfer
 
struct  Frame
 A decoded inner message. payload is a non-owning view into the source bytes. More...
 
struct  FrameHeader
 Fixed header of an inner message. More...
 
class  MdnsDiscovery
 
class  MessageJson
 
class  Node
 
struct  NodeConfig
 
struct  NodeContext
 
class  Peer
 
class  PeerId
 
struct  PeerInfo
 
class  PeerNetwork
 
class  PingService
 
struct  PortMappingConfig
 Configuration for automatic port forwarding (see PortMappingService). More...
 
class  PortMappingService
 Maps the node's TCP listen port through the home router via UPnP and/or NAT-PMP. More...
 
struct  PortMapResult
 Result of a port mapping attempt. More...
 
class  PubSub
 
class  ReconnectionService
 
class  ServiceRegistry
 
class  Subsystem
 A pluggable network subsystem. More...
 

Typedefs

using PortMapCallback = std::function< void(const PortMapResult &)>
 Callback invoked whenever a mapping is established, refreshed, removed or fails.
 

Enumerations

enum class  MessageType : uint8_t {
  App = 1 , Control = 2 , Gossip = 3 , FileChunk = 4 ,
  Ping = 5 , Storage = 6 , Typed = 7 , Pex = 8
}
 Inner-message kind. Application traffic uses App, addressed by channel. More...
 
enum class  ValidationResult { Accept , Reject , Ignore }
 Outcome of validating an inbound published message before it is delivered or forwarded. More...
 
enum class  PortMapProtocol : uint8_t { TCP , UDP }
 Transport protocol of a port mapping. More...
 
enum class  PortMapTransport : uint8_t { UPnP , NatPMP }
 Which NAT traversal backend produced a result. More...
 

Functions

const char * to_string (PortMapProtocol p)
 Human readable protocol name ("TCP"/"UDP").
 
const char * to_string (PortMapTransport t)
 Human readable transport name ("UPnP"/"NAT-PMP").
 

Typedef Documentation

◆ PortMapCallback

using librats::PortMapCallback = typedef std::function<void(const PortMapResult&)>

Callback invoked whenever a mapping is established, refreshed, removed or fails.

Always called from the backend's own worker thread.

Definition at line 64 of file port_mapping.h.

Enumeration Type Documentation

◆ MessageType

enum class librats::MessageType : uint8_t
strong

Inner-message kind. Application traffic uses App, addressed by channel.

Enumerator
App 
Control 

core control plane (peer exchange…)

Gossip 
FileChunk 
Ping 

liveness / RTT (PingService)

Storage 

distributed key-value store (StorageManager)

Typed 

typed JSON message exchange (MessageJson)

Pex 

peer exchange — gossip of known peer addresses (PeerExchange)

Definition at line 38 of file frame.h.

◆ PortMapProtocol

enum class librats::PortMapProtocol : uint8_t
strong

Transport protocol of a port mapping.

Enumerator
TCP 
UDP 

Definition at line 22 of file port_mapping.h.

◆ PortMapTransport

enum class librats::PortMapTransport : uint8_t
strong

Which NAT traversal backend produced a result.

Enumerator
UPnP 
NatPMP 

Definition at line 28 of file port_mapping.h.

◆ ValidationResult

enum class librats::ValidationResult
strong

Outcome of validating an inbound published message before it is delivered or forwarded.

REJECT drops it (and would penalise the sender in a scored build); IGNORE drops it silently; ACCEPT delivers locally and forwards along the mesh.

Enumerator
Accept 
Reject 
Ignore 

Definition at line 56 of file pubsub.h.

Function Documentation

◆ to_string() [1/2]

const char * librats::to_string ( PortMapProtocol  p)
inline

Human readable protocol name ("TCP"/"UDP").

Definition at line 34 of file port_mapping.h.

References TCP.

◆ to_string() [2/2]

const char * librats::to_string ( PortMapTransport  t)
inline

Human readable transport name ("UPnP"/"NAT-PMP").

Definition at line 39 of file port_mapping.h.

References UPnP.