Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
|
jam
2011/03/02 00:39:24
do you have your autoprops set? these new files s
Sergey Ulanov
2011/03/02 11:00:47
Yes, I do have these properties set. I use git, an
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ | |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ | |
| 7 | |
| 8 #include "content/common/p2p_sockets.h" | |
| 9 | |
| 10 class P2PSocketsHost; | |
| 11 | |
| 12 // Base class for P2P sockets used by P2PSocketsHost. | |
| 13 class P2PSocketHost { | |
| 14 public: | |
| 15 static P2PSocketHost* Create(P2PSocketsHost* host, int routing_id, int id, | |
|
jam
2011/03/02 00:41:09
can you add a comment as to what this is, i.e. pla
Sergey Ulanov
2011/03/02 11:00:47
Done.
| |
| 16 P2PSocketType type); | |
| 17 | |
| 18 P2PSocketHost(P2PSocketsHost* host, int routing_id, int id); | |
|
jam
2011/03/02 00:41:09
if only derived classes need this, it should be pr
Sergey Ulanov
2011/03/02 11:00:47
Done.
| |
| 19 ~P2PSocketHost(); | |
| 20 | |
| 21 // Initalizes the socket. Returns false when initiazations fails. | |
| 22 virtual bool Init() = 0; | |
| 23 | |
| 24 virtual void Send(P2PSocketAddress socket_address, | |
| 25 const std::vector<char>& data) = 0; | |
| 26 virtual void DestroyConnection(P2PSocketAddress socket_address) = 0; | |
| 27 | |
| 28 protected: | |
| 29 P2PSocketsHost* host_; | |
| 30 int routing_id_; | |
| 31 int id_; | |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); | |
| 34 }; | |
| 35 | |
| 36 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ | |
| OLD | NEW |