grpc_client icon indicating copy to clipboard operation
grpc_client copied to clipboard

OTP 24 golang 1.18 can not worked,but i make it work by change the code

Open xiaodoudou12 opened this issue 3 years ago • 0 comments

  1. when compile show error deps/http2_client/ebin/http2_client.app" is missing kernel from applications list I change src/http2_client.app.src '{applications, [cowlib]}' to '{applications,[cowlib,kernel,stdlib]}'

  2. when connect golang server will show unknown service https://github.com/grpc/grpc-go/blob/master/server.go

func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream, trInfo *traceInfo) {
	sm := stream.Method()
	if sm != "" && sm[0] == '/' {
		sm = sm[1:]
	}
	pos := strings.LastIndex(sm, "/")

when golang grpc client connect server, the sm will be "/helloworld.Greeter/SayHello" but erlang grpc_client connect, sm is "/Greeter/SayHello" so i change https://github.com/Bluehouse-Technology/grpc_client/blob/master/src/grpc_client_stream.erl default_headers Path = iolist_to_binary(["/", Package, atom_to_list(Service), "/", atom_to_list(Rpc)]), to Path = iolist_to_binary(["/", atom_to_list(Encoder), ".", Package, atom_to_list(Service), "/", atom_to_list(Rpc)]),

i do not know why get unknown service and is this change ok?

xiaodoudou12 avatar Aug 19 '22 09:08 xiaodoudou12