MCPcopy
hub / github.com/grpc/grpc-go / main

Function main

examples/features/keepalive/server/main.go:61–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59}
60
61func main() {
62 flag.Parse()
63
64 address := fmt.Sprintf(":%v", *port)
65 lis, err := net.Listen("tcp", address)
66 if err != nil {
67 log.Fatalf("failed to listen: %v", err)
68 }
69
70 s := grpc.NewServer(grpc.KeepaliveEnforcementPolicy(kaep), grpc.KeepaliveParams(kasp))
71 pb.RegisterEchoServer(s, &server{})
72
73 if err := s.Serve(lis); err != nil {
74 log.Fatalf("failed to serve: %v", err)
75 }
76}

Callers

nothing calls this directly

Calls 6

ServeMethod · 0.95
NewServerFunction · 0.92
KeepaliveParamsFunction · 0.92
ParseMethod · 0.65
FatalfMethod · 0.65

Tested by

no test coverage detected