mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
nearby: snapshot of cl/317978613
Signed-off-by: Alexey Polyudov <apolyudov@google.com> Change-Id: I4bf367877a986910bb03e1c54aa972b4bcd59942
This commit is contained in:
@@ -51,7 +51,14 @@ class EndpointManager {
|
||||
virtual ~FrameProcessor() = default;
|
||||
|
||||
// @EndpointManagerReaderThread
|
||||
virtual void OnIncomingFrame(const OfflineFrame& offline_frame,
|
||||
// Called for every incoming frame of registered type.
|
||||
// NOTE(OfflineFrame& frame):
|
||||
// For large payload in data phase, resources may be saved if data is moved,
|
||||
// rather than copied (if passing data by reference is not an option).
|
||||
// To achieve that, OfflineFrame needs to be either mutabe lvalue reference,
|
||||
// or rvalue reference. Rvalue references are discouraged by go/cstyle,
|
||||
// and that leaves us with mutable lvalue reference.
|
||||
virtual void OnIncomingFrame(OfflineFrame& offline_frame,
|
||||
const std::string& from_endpoint_id,
|
||||
ClientProxy* to_client,
|
||||
proto::connections::Medium current_medium) = 0;
|
||||
@@ -77,7 +84,7 @@ class EndpointManager {
|
||||
const FrameProcessor::Handle RegisterFrameProcessor(
|
||||
V1Frame::FrameType frame_type, FrameProcessor* processor);
|
||||
void UnregisterFrameProcessor(V1Frame::FrameType frame_type,
|
||||
const void* handle);
|
||||
const void* handle, bool sync = false);
|
||||
|
||||
// Invoked from the different PcpHandler implementations (of which there can
|
||||
// be only one at a time).
|
||||
|
||||
Reference in New Issue
Block a user