Refactor endpoint verification prior to connection
Summary: ^ There's a similar issue/request for Android. So, this change moves the code out from the FlipperKit into Flipper as to be able to reuse it. Reviewed By: aigoncharov Differential Revision: D35961745 fbshipit-source-id: aa255db582a7852dc06c2feaba389d1dac3b0f67
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2120a94dc3
commit
3826f2c8ef
20
xplat/Flipper/FlipperConnectionEndpointVerifier.h
Normal file
20
xplat/Flipper/FlipperConnectionEndpointVerifier.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace facebook {
|
||||
namespace flipper {
|
||||
struct ConnectionEndpointVerifier {
|
||||
/** Verifies whether the given endpoint is listening
|
||||
for incoming connections. */
|
||||
static bool verify(const std::string& host, int port);
|
||||
};
|
||||
} // namespace flipper
|
||||
} // namespace facebook
|
||||
Reference in New Issue
Block a user