diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2017-05-30 16:34:59 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-06-01 15:54:34 -0700 |
commit | 26ab769940e59646386bd15bbafb9378b8b56aed (patch) | |
tree | b2f6ff05c598326b065bc46cea59d71aca21dcd9 /src/inspector_socket.h | |
parent | ce5745bf92f586c58366e9f738441d69118f2c18 (diff) | |
download | node-new-26ab769940e59646386bd15bbafb9378b8b56aed.tar.gz |
inspector: refactor to rename and comment methods
Pure refactor, makes no functional changes but the renaming helped me
see more clearly what the relationship was between methods and
variables.
* Renamed methods to reduce number of slightly different names for the
same thing ("thread" vs "io thread", etc.).
* Added comments where it was useful to me.
PR-URL: https://github.com/nodejs/node/pull/13321
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/inspector_socket.h')
-rw-r--r-- | src/inspector_socket.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/inspector_socket.h b/src/inspector_socket.h index 558d87bcb7..7cd8254fb3 100644 --- a/src/inspector_socket.h +++ b/src/inspector_socket.h @@ -48,6 +48,7 @@ struct ws_state_s { bool received_close; }; +// HTTP Wrapper around a uv_tcp_t class InspectorSocket { public: InspectorSocket() : data(nullptr), http_parsing_state(nullptr), @@ -58,7 +59,7 @@ class InspectorSocket { struct http_parsing_state_s* http_parsing_state; struct ws_state_s* ws_state; std::vector<char> buffer; - uv_tcp_t client; + uv_tcp_t tcp; bool ws_mode; bool shutting_down; bool connection_eof; @@ -82,7 +83,7 @@ void inspector_write(InspectorSocket* inspector, bool inspector_is_active(const InspectorSocket* inspector); inline InspectorSocket* inspector_from_stream(uv_tcp_t* stream) { - return node::ContainerOf(&InspectorSocket::client, stream); + return node::ContainerOf(&InspectorSocket::tcp, stream); } inline InspectorSocket* inspector_from_stream(uv_stream_t* stream) { |