Thank you, I have checked GRPC_TRACE=handshake, I have found that it uses
`http-connect`. And the class `HttpConnectHandshaker` has the name,
`http_connect`.
class HttpConnectHandshaker : public Handshaker {
public:
HttpConnectHandshaker();
void Shutdown(grpc_error* why) override;
void DoHandshake(grpc_tcp_server_acceptor* acceptor,
grpc_closure* on_handshake_done,
HandshakerArgs* args) override;
const char* name() const override { return "*http_connect*"; }
I made a mistake that I forgot to upload the locally changed
`HttpConnectHandshaker.cc` to the server and missed the mark in the code.
On Tuesday, August 13, 2019 at 10:19:07 AM UTC+8, Yang Gao wrote:
>
> That is like a C++ virtual call and there would be a method on each
> handshaker. For example, the one you found is one of them.
> Not every handshaker is registered/run for every channel. You can run your
> client with GRPC_TRACE=handshaker GRPC_VERBOSITY=DEBUG and check the output
> log to see what handshakers are used.
>
> On Mon, Aug 12, 2019 at 7:11 PM xia rui <[email protected] <javascript:>>
> wrote:
>
>>
>> Hello,everyone
>> I am trying to trace the workflow of gRPC connection setup.
>>
>> I find that class `HandshakerManager` uses
>> `HandshakeManager::CallNextHandshakerLocked` to start handshaking and run
>> its callback.
>>
>> In `HandshakeManager::CallNextHandshakerLocked`, there is a function call
>> around line 178
>> ```
>> auto handshaker = handshakers_[index_];
>> if (GRPC_TRACE_FLAG_ENABLED(grpc_handshaker_trace)) {
>> gpr_log(
>> GPR_INFO,
>> "handshake_manager %p: calling handshaker %s [%p] at index %"
>> PRIuPTR,
>> this, handshaker->name(), handshaker.get(), index_);
>> }
>>
>> handshaker->DoHandshake(acceptor_, &call_next_handshaker_, &args_);
>> ```
>>
>> I think function `DoHandshake` actually do the handshaking. But I do not
>> know where it is.
>>
>> I guess it may be `HttpConnectHandshaker::DoHandshake`, and mark a
>> `printf` there. However, the function in `HandshakeManager` does not call
>> `HttpConnectHandshaker`.
>>
>> So, where is the actual implementation of `DoHandshake`.
>>
>> Thank you for your time.
>>
>> Best wishes,
>> Xia Rui
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "grpc.io" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grpc-io/63dd2e13-06a5-4a0e-a218-3ea8386aa565%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/grpc-io/63dd2e13-06a5-4a0e-a218-3ea8386aa565%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/1947a779-e558-4d9b-96fc-6f68f64a1829%40googlegroups.com.