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

Side by Side Diff: content/browser/renderer_host/p2p_socket_host.h

Issue 6598053: P2P Sockets host implementation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: - Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages.h ('k') | content/browser/renderer_host/p2p_socket_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #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 // Creates P2PSocketHost for the current platform. Must be
16 // implemented in a platform-specific file.
17 static P2PSocketHost* Create(P2PSocketsHost* host, int routing_id, int id,
18 P2PSocketType type);
19
20 virtual ~P2PSocketHost();
21
22 // Initalizes the socket. Returns false when initiazations fails.
23 virtual bool Init() = 0;
24
25 // Sends |data| on the socket to |socket_address|.
26 virtual void Send(P2PSocketAddress socket_address,
27 const std::vector<char>& data) = 0;
28
29 protected:
30 P2PSocketHost(P2PSocketsHost* host, int routing_id, int id);
31
32 P2PSocketsHost* host_;
33 int routing_id_;
34 int id_;
35
36 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost);
37 };
38
39 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | content/browser/renderer_host/p2p_socket_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698