From c0e0aafa749f893d7b4f75a8dd7b93fea8153cdc Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Tue, 22 Dec 2015 15:25:08 +0900 Subject: gobgpd/gobgp: change grcp port to 50051 from 8080 also add an option to change grpc port Signed-off-by: ISHIDA Wataru --- docs/sources/grpc-client.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/sources/grpc-client.md') diff --git a/docs/sources/grpc-client.md b/docs/sources/grpc-client.md index 33f7a98c..7740eede 100644 --- a/docs/sources/grpc-client.md +++ b/docs/sources/grpc-client.md @@ -90,7 +90,7 @@ _TIMEOUT_SECONDS = 10 def run(gobgpd_addr, neighbor_addr): - channel = implementations.insecure_channel(gobgpd_addr, 8080) + channel = implementations.insecure_channel(gobgpd_addr, 50051) with gobgp_pb2.beta_create_GobgpApi_stub(channel) as stub: peer = stub.GetNeighbor(gobgp_pb2.Arguments(rf=4, name=neighbor_addr), _TIMEOUT_SECONDS) print("BGP neighbor is %s, remote AS %d" % (peer.conf.neighbor_address, peer.conf.peer_as)) @@ -185,7 +185,7 @@ require 'gobgp_services' host = 'localhost' host = ARGV[0] if ARGV.length > 0 -stub = Gobgpapi::GobgpApi::Stub.new("#{host}:8080") +stub = Gobgpapi::GobgpApi::Stub.new("#{host}:50051") arg = Gobgpapi::Arguments.new() stub.get_neighbors(arg).each do |n| puts "BGP neighbor is #{n.conf.neighbor_address}, remote AS #{n.conf.peer_as}" @@ -339,7 +339,7 @@ Here is an example to show neighbor information. ```javascript var grpc = require('grpc'); var api = grpc.load('gobgp.proto').gobgpapi; -var stub = new api.GobgpApi('localhost:8080', grpc.Credentials.createInsecure()); +var stub = new api.GobgpApi('localhost:50051', grpc.Credentials.createInsecure()); var call = stub.getNeighbors({}); call.on('data', function(neighbor) { -- cgit v1.2.3