Update ServerGlobalCallback::AddPort api

pull/10663/head
yang-g 8 years ago
parent 1b76bda4a6
commit eafeea48a9
  1. 3
      include/grpc++/server.h
  2. 2
      src/cpp/server/server_cc.cc

@ -89,7 +89,8 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
/// Called before server is started.
virtual void PreServerStart(Server* server) {}
/// Called after a server port is added.
virtual void AddPort(Server* server, int port) {}
virtual void AddPort(Server* server, const grpc::string& addr,
ServerCredentials* creds, int port) {}
};
/// Set the global callback object. Can only be called once. Does not take
/// ownership of callbacks, and expects the pointed to object to be alive

@ -490,7 +490,7 @@ int Server::AddListeningPort(const grpc::string& addr,
ServerCredentials* creds) {
GPR_ASSERT(!started_);
int port = creds->AddPortToServer(addr, server_);
global_callbacks_->AddPort(this, port);
global_callbacks_->AddPort(this, addr, creds, port);
return port;
}

Loading…
Cancel
Save