Add FBPortForwarding source code
Summary: See FBPortForwarding/README.md for an explanation of what this is. It's required for the upcoming support for physical iOS devices. To simplify development of the JS app, We're going to bundle the pre-built PortForwardingMacApp inside the repo, and inside the electron app (static/PortForwardingMacApp.app). Adding this source so users can build it from source if they choose to. Reviewed By: danielbuechele Differential Revision: D13276022 fbshipit-source-id: 99b18e0412cf443bb4a67eb4846cc780e0014de1
This commit is contained in:
committed by
Facebook Github Bot
parent
98110bc230
commit
8d93946739
23
iOS/FlipperKit/FKPortForwarding/FKPortForwardingCommon.h
Normal file
23
iOS/FlipperKit/FKPortForwarding/FKPortForwardingCommon.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define FBPFTrace(...) /*NSLog(__VA_ARGS__)*/
|
||||
#define FBPFLog(...) NSLog(__VA_ARGS__)
|
||||
|
||||
enum {
|
||||
FKPortForwardingFrameTypeOpenPipe = 201,
|
||||
FKPortForwardingFrameTypeWriteToPipe = 202,
|
||||
FKPortForwardingFrameTypeClosePipe = 203,
|
||||
};
|
||||
|
||||
static dispatch_data_t NSDataToGCDData(NSData *data) {
|
||||
__block NSData *retainedData = data;
|
||||
return dispatch_data_create(data.bytes, data.length, nil, ^{
|
||||
retainedData = nil;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user