The typical usage in go is:
server := grpc.NewServer()
pb.RegisterUserServer(server, &userSrvc.UserServer{})
addr := ":" + env.GetMyRpcPort()
lis, _ := net.Listen("tcp", addr)
server.Serve(lis)
I wonder can I run a server on a connected conn like:
conn, _ := net.Dial("tcp",":8080")
server.Serve(conn)
The client connect to the server first, and then construct a grpc server on the connected net.conn, then the server can rpc call the client to push some message as a request to the client.
I think that you need a bidirectional streaming. Here is one elaborated example of using bidirectional GRPC in Go: https://github.com/pahanini/go-grpc-bidirectional-streaming-example.