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

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: - 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
« no previous file with comments | « content/common/p2p_messages.h ('k') | content/common/p2p_sockets.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..82c59834173fe5b665c530bc3497744d65b54fc8
--- /dev/null
+++ b/content/common/p2p_messages.cc
@@ -0,0 +1,31 @@
+// 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.
+
+#define IPC_MESSAGE_IMPL
+#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
« no previous file with comments | « content/common/p2p_messages.h ('k') | content/common/p2p_sockets.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698