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]> 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].
> 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/CAB1HKY7oHyp-EZ0NCDzDnoShWwNUtK2O8d84YbTuiPLtxD_Txw%40mail.gmail.com.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to