-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject InspectorFrontendHost in the Inspector frontend and communicate over raw sockets #317
Conversation
Test PASSed. |
struct communication_channel { | ||
BOOL connected; | ||
dispatch_fd_t socket; | ||
__unsafe_unretained dispatch_io_t io_channel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use a class instead of a struct so that ARC can manage the class instance and the dispatch_io_t
object within.
For C functions prefer prefixed PascalCased names, like in CoreFoundation, or TNSDebugging. Apply the |
Test PASSed. |
|
||
CommunicationChannel* TNSSetupCommunicationChannel(char* socket_path, InspectorReadHandler read_handler, InspectorErrorHandler error_handler) { | ||
__block dispatch_fd_t _socket; | ||
__block dispatch_io_t _channel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider renaming these to something more descriptive.
Test PASSed. |
I think the functions in |
Test PASSed. |
@property(nonatomic) dispatch_fd_t socket; | ||
@property(nonatomic, strong) dispatch_io_t ioChannel; | ||
|
||
- (id)initWithSocketPath:(NSString*)socketPath readHandler:(InspectorReadHandler)readHandler errorHandler:(InspectorErrorHandler)errorHandler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be instancetype
instead of id
.
Test PASSed. |
Looks good to me. Please squash this and be sure to update the Inspector binary blob in the repo with the new build so we can merge it. |
Test PASSed. |
…to communicate with the inspector
…ive chunks of the data instead of the whole data, so set a low water to disable the chunk receiving.
bd60742
to
c180115
Compare
Test PASSed. |
…unication Inject InspectorFrontendHost in the Inspector frontend and communicate over raw sockets
#306