def add_insecure_port(self, address: str) -> int: """Opens an insecure port for accepting RPCs. This method may only be called before starting the server. Args: address: The address for which to open a port. If the port is 0, or not specified in the address, then the gRPC runtime will choose a port. Returns: An integer port on which the server will accept RPC requests. """ return _common.validate_port_binding_result( address, self._server.add_insecure_port(_common.encode(address)))
def add_secure_port(self, address, server_credentials): return _common.validate_port_binding_result( address, _add_secure_port(self._state, _common.encode(address), server_credentials))
def add_insecure_port(self, address): return _common.validate_port_binding_result( address, _add_insecure_port(self._state, _common.encode(address)))