How zenomt/rtmfp-cpp works
This is a C++ RTMFP library for clients, servers, and peer-to-peer applications. The main workflow begins when a host configures platform and cryptography adapters, registers network interfaces, and opens or accepts flows; RTMFP establishes secure sessions and carries ordered, deadline-aware messages to peers. Distinct protocol stages include packet/interface handling, session keying, flow/message transfer, and optional Tin-Can media streaming or redirector-based load balancing. The tree and README support these subsystem boundaries; sampled excerpts confirm selected session, flow synchronization, crypto, and redirector behavior, but not every internal call path.
Main entry points: RTMFP.cpp RTMFP engine · TCConnection.cpp Tin-Can connection · Session.cpp Sessions · SendFlow.cpp Send flows
Components 23
Host integration
- Platform adapter
include/rtmfp/rtmfp.hpp - POSIX adapters
src/PosixPlatformAdapter.cpp - Run loops
include/rtmfp/RunLoops.hpp - Performer
src/Performer.cpp - Crypto adapter API
include/rtmfp/rtmfp.hpp - Flash crypto
src/FlashCryptoAdapter.cpp - OpenSSL crypto
src/FlashCryptoAdapter_OpenSSL.cpp - Plain crypto
src/PlainCryptoAdapter.cpp
RTMFP protocol
- RTMFP engine
src/RTMFP.cpp - Network interfaces
src/Interface.cpp - Sessions
src/Session.cpp - Packet assembly
src/PacketAssembler.cpp
Flow delivery
- Send flows
src/SendFlow.cpp - Receive flows
src/RecvFlow.cpp - Write receipts
src/WriteReceipt.cpp - Flow synchronization
src/FlowSyncManager.cpp
Tin-Can media
- Tin-Can connection
src/TCConnection.cpp - Tin-Can messages
src/TCMessage.cpp - Media streams
src/Media.cpp
Optional integrations
- Redirector client
src/RedirectorClient.cpp
Other components
- Host application
- Remote peer
- Host network
Connections 31
- Host application → Platform adapter: provides adapter
- Host application → Crypto adapter API: provides adapter
- Host application → RTMFP engine: opens flows
- Platform adapter → RTMFP engine: dispatches packets
- RTMFP engine → Platform adapter: requests I/O
- POSIX adapters → Run loops: runs on
- POSIX adapters → RTMFP engine: adapts platform
- Performer → Run loops: synchronizes tasks
- Crypto adapter API → Flash crypto: implemented by
- Flash crypto → OpenSSL crypto: primitives from
- Crypto adapter API → Plain crypto: implemented by
- RTMFP engine → Crypto adapter API: requests crypto
- RTMFP engine → Network interfaces: manages interfaces
- RTMFP engine → Sessions: manages sessions
- Sessions → Packet assembly: assembles packets
- Network interfaces → Host network: sends and receives
- Sessions → Remote peer: exchanges packets
- Sessions → Send flows: binds flows
- Sessions → Receive flows: binds flows
- Host application → Send flows: writes messages
- Send flows → Write receipts: issues receipts
- Receive flows → Host application: delivers messages
- Host application → Receive flows: accepts flows
- Tin-Can connection → Send flows: transports messages
- Tin-Can connection → Receive flows: receives messages
- Tin-Can connection → Tin-Can messages: encodes commands
- Tin-Can connection → Media streams: handles streams
- Tin-Can connection → Flow synchronization: synchronizes flows
- Redirector client → RTMFP engine: opens redirector flow
- Redirector client → Send flows: sends settings
- Redirector client → Host application: reports status