Repository navigation
Conversation
385c42c to
3c9504e
Compare
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
bfe3441 to
7dcb5bb
Compare
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
7dcb5bb to
ca34ebe
Compare
| class CallMessageView | ||
| { | ||
| public: | ||
| explicit CallMessageView(const CallMessage* value = nullptr) : value_(value) |
There was a problem hiding this comment.
Is it really a good idea to pass CallMessage as raw pointer? Would a shared_ptr or unique_ptr be better?
| /// Returns whether call-opening metadata is present. | ||
| [[nodiscard]] bool has_open_call() const noexcept; | ||
| /// Returns call-opening metadata, or null when absent. | ||
| [[nodiscard]] const OpenCall* open_call() const noexcept; |
There was a problem hiding this comment.
I'am not sure if it's a good idea to return raw pointers here. Wouldn't it be better to return the std::optional?
|
In many places you use the |
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
|
| TransportError | ||
| }; | ||
| /// Machine-readable and human-readable operation error details. | ||
| struct ErrorInfo |
There was a problem hiding this comment.
Maybe actually use a class because the members should be constant after creation
| using Timeout = std::optional<std::chrono::steady_clock::duration>; | ||
|
|
||
| /// Named string or binary payload. | ||
| struct Payload |
There was a problem hiding this comment.
We should split this file, we have general types for the interface and then types for the content
| [[nodiscard]] bool has_server_capabilities() const noexcept; | ||
| /// Returns server capabilities, or an empty optional when absent. | ||
| [[nodiscard]] | ||
| std::optional<std::reference_wrapper<const ServerCapabilities>> server_capabilities() |
There was a problem hiding this comment.
Can we use the Flatbuffer object here instead of defining a new new type which we need to synchronize
| /// Returns whether payloads are present. | ||
| [[nodiscard]] bool has_payloads() const noexcept; | ||
| /// Returns payloads, or an empty optional when absent. | ||
| [[nodiscard]] std::optional<std::reference_wrapper<const Payloads>> payloads() const noexcept; |
There was a problem hiding this comment.
Can we use the Flatbuffer object here instead of defining a new new type which we need to synchronize
| /// Returns whether an error is present. | ||
| [[nodiscard]] bool has_error() const noexcept; | ||
| /// Returns the error, or an empty optional when absent. | ||
| [[nodiscard]] std::optional<std::reference_wrapper<const ErrorInfo>> error() const noexcept; |
There was a problem hiding this comment.
Can we use the Flatbuffer object here instead of defining a new new type which we need to synchronize
| /// Returns whether connection shutdown is being started or acknowledged. | ||
| [[nodiscard]] bool has_close_connection() const noexcept; | ||
| /// Returns whether this message starts or acknowledges connection shutdown. | ||
| [[nodiscard]] bool close_connection() const noexcept; |
There was a problem hiding this comment.
has_close_connection() and close_connection() are duplicated
| /// Returns whether a keep-alive is present. | ||
| [[nodiscard]] bool has_keep_alive() const noexcept; | ||
| /// Returns whether this message is a keep-alive message. | ||
| [[nodiscard]] bool keep_alive() const noexcept; |
There was a problem hiding this comment.
KeepAlive is a table for a reason in the Flatbuffer we should return the Flatbuffer object


No description provided.