Skip to content

Commit

Permalink
src: organize TLSWrap declarations by parent
Browse files Browse the repository at this point in the history
Make it clear which of the multiple interfaces a TLSWrap method is
implementing by grouping and commenting the related methods.

PR-URL: #25861
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
sam-github committed Feb 5, 2019
1 parent 73b204c commit 24ea4a3
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/tls_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,19 @@ class TLSWrap : public AsyncWrap,
v8::Local<v8::Context> context,
void* priv);

int GetFD() override;
// Implement StreamBase:
bool IsAlive() override;
bool IsClosing() override;

// JavaScript functions
int ReadStart() override;
int ReadStop() override;

bool IsIPCPipe() override;
int GetFD() override;
ShutdownWrap* CreateShutdownWrap(
v8::Local<v8::Object> req_wrap_object) override;
AsyncWrap* GetAsyncWrap() override;


// Implement StreamResource:
int ReadStart() override; // Exposed to JS
int ReadStop() override; // Exposed to JS
int DoShutdown(ShutdownWrap* req_wrap) override;
int DoWrite(WriteWrap* w,
uv_buf_t* bufs,
Expand All @@ -79,8 +82,8 @@ class TLSWrap : public AsyncWrap,

void NewSessionDoneCb();

// Implement MemoryRetainer:
void MemoryInfo(MemoryTracker* tracker) const override;

SET_MEMORY_INFO_NAME(TLSWrap)
SET_SELF_SIZE(TLSWrap)

Expand Down Expand Up @@ -136,13 +139,11 @@ class TLSWrap : public AsyncWrap,
}
}

AsyncWrap* GetAsyncWrap() override;
bool IsIPCPipe() override;

// Resource implementation
void OnStreamAfterWrite(WriteWrap* w, int status) override;
// Implement StreamListener:
// Returns buf that points into enc_in_.
uv_buf_t OnStreamAlloc(size_t size) override;
void OnStreamRead(ssize_t nread, const uv_buf_t& buf) override;
void OnStreamAfterWrite(WriteWrap* w, int status) override;

v8::Local<v8::Value> GetSSLError(int status, int* err, std::string* msg);

Expand Down

0 comments on commit 24ea4a3

Please sign in to comment.