Don't use private access in FlipperRSocketResponder

Summary:
Changing FlipperRSocketResponder to only use public parts of FlipperConnectionManagerImpl.

This means we can test it by injecting a FCM mock, and it can use its public interface.

Reviewed By: passy

Differential Revision: D14000078

fbshipit-source-id: c0431a888b0ca041807631c81b99fb8b947274d6
This commit is contained in:
John Knox
2019-02-11 14:01:32 -08:00
committed by Facebook Github Bot
parent c48c1a728a
commit 5da8f35ee3
8 changed files with 142 additions and 47 deletions

View File

@@ -45,6 +45,13 @@ class FlipperConnectionManager {
The callbacks should be set before a connection is established.
*/
virtual void setCallbacks(Callbacks* callbacks) = 0;
/**
Called by ws server when a message has been received.
*/
virtual void onMessageReceived(
const folly::dynamic& message,
std::unique_ptr<FlipperResponder> responder) = 0;
};
class FlipperConnectionManager::Callbacks {