Return port number from EventEngine::Listener::Bind (#26004)

* Return port number from EventEngine::Listener::Bind

This is an integer, unlike the DNSResolver, since the underlying
bind syscall deals in integers.

* Add return type documentation
pull/26017/head
AJ Heller 4 years ago committed by GitHub
parent 5917984194
commit d3677e569a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      include/grpc/event_engine/event_engine.h

@ -160,11 +160,10 @@ class EventEngine {
virtual ~Listener() = 0;
// TODO(hork): define return status codes
// TODO(hork): requires output port argument, return value, or callback
/// Bind an address/port to this Listener. It is expected that multiple
/// addresses/ports can be bound to this Listener before Listener::Start has
/// been called.
virtual absl::Status Bind(const ResolvedAddress& addr) = 0;
/// been called. Returns the bound port or an error status.
virtual absl::StatusOr<int> Bind(const ResolvedAddress& addr) = 0;
virtual absl::Status Start() = 0;
};

Loading…
Cancel
Save