OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/common/p2p_messages.h" |
| 6 |
| 7 namespace IPC { |
| 8 |
| 9 void ParamTraits<P2PSocketAddress>::Write(Message* m, const param_type& p) { |
| 10 WriteParam(m, p.address); |
| 11 WriteParam(m, p.port); |
| 12 } |
| 13 |
| 14 bool ParamTraits<P2PSocketAddress>::Read(const Message* m, |
| 15 void** iter, |
| 16 param_type* p) { |
| 17 return |
| 18 ReadParam(m, iter, &p->address) && |
| 19 ReadParam(m, iter, &p->port); |
| 20 } |
| 21 |
| 22 void ParamTraits<P2PSocketAddress>::Log(const param_type& p, std::string* l) { |
| 23 l->append("("); |
| 24 LogParam(p.address, l); |
| 25 l->append(", "); |
| 26 LogParam(p.port, l); |
| 27 l->append(")"); |
| 28 } |
| 29 |
| 30 } // namespace IPC |
OLD | NEW |