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

Unified Diff: content/common/p2p_messages.cc

Issue 6598053: P2P Sockets host implementation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed all comments Created 9 years, 10 months 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: content/common/p2p_messages.cc
diff --git a/content/common/p2p_messages.cc b/content/common/p2p_messages.cc
new file mode 100644
index 0000000000000000000000000000000000000000..21115a0c793eec565bd7ed87a6a8c56c0a232ecf
--- /dev/null
+++ b/content/common/p2p_messages.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2011 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.
+
+#include "content/common/p2p_messages.h"
+
+namespace IPC {
+
+void ParamTraits<P2PSocketAddress>::Write(Message* m, const param_type& p) {
+ WriteParam(m, p.address);
+ WriteParam(m, p.port);
+}
+
+bool ParamTraits<P2PSocketAddress>::Read(const Message* m,
+ void** iter,
+ param_type* p) {
+ return
+ ReadParam(m, iter, &p->address) &&
+ ReadParam(m, iter, &p->port);
+}
+
+void ParamTraits<P2PSocketAddress>::Log(const param_type& p, std::string* l) {
+ l->append("(");
+ LogParam(p.address, l);
+ l->append(", ");
+ LogParam(p.port, l);
+ l->append(")");
+}
+
+} // namespace IPC

Powered by Google App Engine
This is Rietveld 408576698