MCPcopy Create free account
hub / github.com/catboost/catboost / OnCanRead

Method OnCanRead

library/cpp/neh/http2.cpp:858–868  ·  view source on GitHub ↗

method for reaction on input data for re-used keep-alive connection, which free/release buffer when was placed in cache

Source from the content-addressed store, hash-verified

856 //method for reaction on input data for re-used keep-alive connection,
857 //which free/release buffer when was placed in cache
858 void OnCanRead(const TErrorCode& err, IHandlingContext& ctx) {
859 if (Y_UNLIKELY(err)) {
860 OnError(err);
861 } else {
862 if (!Buff_) {
863 Buff_.Reset(new char[BuffSize_]);
864 }
865 TErrorCode ec;
866 OnReadSome(ec, AS_.ReadSome(Buff_.Get(), BuffSize_, ec), ctx);
867 }
868 }
869
870 //unlink connection and request, thread-safe mark connection as non valid
871 inline THttpRequestRef GetRequest() noexcept {

Callers

nothing calls this directly

Calls 3

ResetMethod · 0.45
ReadSomeMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected