Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: blimp/net/grpc_engine_transport.h

Issue 2462183002: GRPC Stream implementation of HeliumStream
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: blimp/net/grpc_engine_transport.h
diff --git a/blimp/net/grpc_engine_transport.h b/blimp/net/grpc_engine_transport.h
new file mode 100644
index 0000000000000000000000000000000000000000..dc5b49126242cfa71f2516d01e380abdf0d78261
--- /dev/null
+++ b/blimp/net/grpc_engine_transport.h
@@ -0,0 +1,44 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BLIMP_NET_GRPC_ENGINE_TRANSPORT_H_
+#define BLIMP_NET_GRPC_ENGINE_TRANSPORT_H_
+
+#include <memory>
+#include <string>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "blimp/net/blimp_net_export.h"
+#include "blimp/net/blimp_engine_transport.h"
+#include "net/base/completion_callback.h"
+
+namespace grpc {
+class Server;
+class CompletionQueue;
+}
+
+namespace blimp {
+
+class GrpcEngineStream;
+class GrpcConnection;
+
+class BLIMP_NET_EXPORT GrpcEngineTransport : public BlimpEngineTransport {
+ public:
+ GrpcEngineTransport(const std::string& ip_address);
+
+ void Connect(const net::CompletionCallback& callback) override;
+ std::unique_ptr<BlimpConnection> MakeConnection() override;
+ const char* GetName() const override;
+ void GetLocalAddress(net::IPEndPoint* address) const override;
+ ~GrpcEngineTransport() override;
+
+ private:
+ std::string ip_address_;
+ std::unique_ptr<GrpcConnection> grpc_connection_;
+};
+
+} // namespace blimp
+
+#endif // BLIMP_NET_GRPC_ENGINE_TRANSPORT_H_

Powered by Google App Engine
This is Rietveld 408576698