Skip to content

Commit

Permalink
CC enclave app example: check that handshake is successful.
Browse files Browse the repository at this point in the history
Change-Id: I49e0bd8affcd66a9b1959f46bb6406968593597b
  • Loading branch information
ernoc committed Jan 15, 2025
1 parent 930f945 commit 7548c99
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cc/containers/hello_world_enclave_app/app_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,14 @@ grpc::Status EnclaveApplicationImpl::LegacySession(
grpc::Status EnclaveApplicationImpl::OakSession(
grpc::ServerContext* context,
grpc::ServerReaderWriter<SessionResponse, SessionRequest>* stream) {
// Set up channel and do handshake.
auto channel = session_server_.NewChannel(
std::make_unique<transport::GrpcSyncSessionServerTransport>(stream));
if (!channel.ok()) {
return FromAbsl(channel.status());
}

// Handshake done, process requests until closed.
while (true) {
absl::StatusOr<std::string> request = (*channel)->Receive();
if (!request.ok()) {
Expand Down

0 comments on commit 7548c99

Please sign in to comment.