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

Side by Side Diff: content/common/p2p_socket_type.h

Issue 193663003: Push remote hostname to P2P socket host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « content/common/p2p_messages.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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines some basic types used by the P2P-related IPC 5 // This file defines some basic types used by the P2P-related IPC
6 // messages. 6 // messages.
7 7
8 #ifndef CONTENT_COMMON_P2P_SOCKET_TYPE_H_ 8 #ifndef CONTENT_COMMON_P2P_SOCKET_TYPE_H_
9 #define CONTENT_COMMON_P2P_SOCKET_TYPE_H_ 9 #define CONTENT_COMMON_P2P_SOCKET_TYPE_H_
10 10
Sergey Ulanov 2014/03/11 22:02:16 also need to include <string> here
Mallinath (Gone from Chromium) 2014/03/11 22:31:03 Done.
11 #include "net/base/ip_endpoint.h"
12
11 namespace content { 13 namespace content {
12 14
13 enum P2PSocketOption { 15 enum P2PSocketOption {
14 P2P_SOCKET_OPT_RCVBUF, // Receive buffer size. 16 P2P_SOCKET_OPT_RCVBUF, // Receive buffer size.
15 P2P_SOCKET_OPT_SNDBUF, // Send buffer size. 17 P2P_SOCKET_OPT_SNDBUF, // Send buffer size.
16 P2P_SOCKET_OPT_DSCP, // DSCP code. 18 P2P_SOCKET_OPT_DSCP, // DSCP code.
17 P2P_SOCKET_OPT_MAX 19 P2P_SOCKET_OPT_MAX
18 }; 20 };
19 21
20 // Type of P2P Socket. 22 // Type of P2P Socket.
21 enum P2PSocketType { 23 enum P2PSocketType {
22 P2P_SOCKET_UDP, 24 P2P_SOCKET_UDP,
23 P2P_SOCKET_TCP_SERVER, 25 P2P_SOCKET_TCP_SERVER,
24 P2P_SOCKET_STUN_TCP_SERVER, 26 P2P_SOCKET_STUN_TCP_SERVER,
25 P2P_SOCKET_TCP_CLIENT, 27 P2P_SOCKET_TCP_CLIENT,
26 P2P_SOCKET_STUN_TCP_CLIENT, 28 P2P_SOCKET_STUN_TCP_CLIENT,
27 P2P_SOCKET_SSLTCP_CLIENT, 29 P2P_SOCKET_SSLTCP_CLIENT,
28 P2P_SOCKET_STUN_SSLTCP_CLIENT, 30 P2P_SOCKET_STUN_SSLTCP_CLIENT,
29 P2P_SOCKET_TLS_CLIENT, 31 P2P_SOCKET_TLS_CLIENT,
30 P2P_SOCKET_STUN_TLS_CLIENT, 32 P2P_SOCKET_STUN_TLS_CLIENT,
31 P2P_SOCKET_TYPE_LAST = P2P_SOCKET_STUN_TLS_CLIENT 33 P2P_SOCKET_TYPE_LAST = P2P_SOCKET_STUN_TLS_CLIENT
32 }; 34 };
33 35
36 // Struct which carries both resolved IP address and host string literal.
37 // Port number will be part of |ip_address|.
38 struct P2PHostAndIPEndPoint {
39 P2PHostAndIPEndPoint() {}
40 P2PHostAndIPEndPoint(const std::string& hostname,
41 const net::IPEndPoint& ip_address)
42 : hostname(hostname), ip_address(ip_address) {
43 }
44
45 std::string hostname;
46 net::IPEndPoint ip_address;
47 };
48
34 } // namespace content 49 } // namespace content
35 50
36 #endif // CONTENT_COMMON_P2P_SOCKET_TYPE_H_ 51 #endif // CONTENT_COMMON_P2P_SOCKET_TYPE_H_
OLDNEW
« no previous file with comments | « content/common/p2p_messages.h ('k') | content/renderer/p2p/ipc_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698