diff options
Diffstat (limited to 'examples/python/route_guide/route_guide_server.py')
-rw-r--r-- | examples/python/route_guide/route_guide_server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/python/route_guide/route_guide_server.py b/examples/python/route_guide/route_guide_server.py index 44bbacf5f3..f23b98bf36 100644 --- a/examples/python/route_guide/route_guide_server.py +++ b/examples/python/route_guide/route_guide_server.py @@ -65,7 +65,7 @@ def get_distance(start, end): R = 6371000; # metres return R * c; -class RouteGuideServicer(route_guide_pb2.EarlyAdopterRouteGuideServicer): +class RouteGuideServicer(route_guide_pb2.BetaRouteGuideServicer): """Provides methods that implement functionality of route guide server.""" def __init__(self): @@ -121,8 +121,8 @@ class RouteGuideServicer(route_guide_pb2.EarlyAdopterRouteGuideServicer): def serve(): - server = route_guide_pb2.early_adopter_create_RouteGuide_server( - RouteGuideServicer(), 50051, None, None) + server = route_guide_pb2.beta_create_RouteGuide_server(RouteGuideServicer()) + server.add_insecure_port('[::]:50051') server.start() try: while True: |