flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

[golang]grpc used deprecated functions

Open godcong opened this issue 3 years ago • 4 comments

In the latest flatbuffers example, grpc is still using the deprecated function I searched the documentation and found that it should be changed to this

https://github.com/google/flatbuffers/blob/83a43fc7977b67259c6a78147cf1c09fe6af85f7/grpc/examples/go/greeter/client/main.go#L66

=>

conn, err := grpc.Dial(fmt.Sprintf("localhost:%d", 3000),grpc.WithTransportCredentials(insecure.NewCredentials()),
			grpc.WithDefaultCallOptions(grpc.ForceCodec(flatbuffers.FlatbuffersCodec{})))

I hope I'm using it the right way I can provide PR if it is correct

godcong avatar Jun 21 '22 11:06 godcong

Hey, so what you can do to verify is this is correct is to boot up the other grpc server/client and try to receive data from and to the go server/client

mustiikhalil avatar Jun 21 '22 11:06 mustiikhalil

@mustiikhalil Yes, in my project I am now using the new function to link

godcong avatar Jun 21 '22 11:06 godcong

@godcong and its receiving data from the (swift/ts) server/client? If yes you can open a PR and i'll review it

mustiikhalil avatar Jun 21 '22 12:06 mustiikhalil

@mustiikhalil ts test code works correctly. I'm sorry I haven't used swift, so I didn't try this piece

godcong avatar Jun 22 '22 07:06 godcong