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

Side by Side Diff: content/public/renderer/p2p_socket_client_delegate.h

Issue 45183002: Expose the p2p client in content/public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gyp file Created 7 years 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 | « content/public/renderer/p2p_socket_client.h ('k') | content/renderer/p2p/ipc_socket_factory.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_PUBLIC_RENDERER_P2P_SOCKET_CLIENT_DELEGATE_H_
6 #define CONTENT_PUBLIC_RENDERER_P2P_SOCKET_CLIENT_DELEGATE_H_
7
8 #include <vector>
9
10 #include "base/memory/ref_counted.h"
11 #include "content/public/common/p2p_socket_type.h"
12 #include "net/base/ip_endpoint.h"
13
14 namespace content {
15
16 class P2PSocketClient;
17
18 class P2PSocketClientDelegate {
19 public:
20 virtual ~P2PSocketClientDelegate() { }
21
22 // Called after the socket has been opened with the local endpoint address
23 // as argument. Please note that in the precence of multiple interfaces,
24 // you should not rely on the local endpoint address if possible.
25 virtual void OnOpen(const net::IPEndPoint& address) = 0;
26
27 // For a socket that is listening on incoming TCP connectsion, this
28 // function is called when a new client connects.
29 virtual void OnIncomingTcpConnection(const net::IPEndPoint& address,
30 P2PSocketClient* client) = 0;
31
32 // Called once for each Send() call after the send is complete.
33 virtual void OnSendComplete() = 0;
34
35 // Called if an non-retryable error occurs.
36 virtual void OnError() = 0;
37
38 // Called when data is received on the socket.
39 virtual void OnDataReceived(const net::IPEndPoint& address,
40 const std::vector<char>& data) = 0;
41 };
42
43 } // namespace content
44
45 #endif // CONTENT_PUBLIC_RENDERER_P2P_SOCKET_CLIENT_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/renderer/p2p_socket_client.h ('k') | content/renderer/p2p/ipc_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698