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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host.h

Issue 22452002: Adding TLS support to the TCP Client sockets. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "content/common/p2p_sockets.h" 9 #include "content/common/p2p_sockets.h"
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 STUN_ALLOCATE_ERROR_RESPONSE = 0x0113, 57 STUN_ALLOCATE_ERROR_RESPONSE = 0x0113,
58 STUN_SEND_REQUEST = 0x0004, 58 STUN_SEND_REQUEST = 0x0004,
59 STUN_SEND_RESPONSE = 0x0104, 59 STUN_SEND_RESPONSE = 0x0104,
60 STUN_SEND_ERROR_RESPONSE = 0x0114, 60 STUN_SEND_ERROR_RESPONSE = 0x0114,
61 STUN_DATA_INDICATION = 0x0115 61 STUN_DATA_INDICATION = 0x0115
62 }; 62 };
63 63
64 enum State { 64 enum State {
65 STATE_UNINITIALIZED, 65 STATE_UNINITIALIZED,
66 STATE_CONNECTING, 66 STATE_CONNECTING,
67 STATE_TLS_CONNECTING,
67 STATE_OPEN, 68 STATE_OPEN,
68 STATE_ERROR, 69 STATE_ERROR,
69 }; 70 };
70 71
71 P2PSocketHost(IPC::Sender* message_sender, int id); 72 P2PSocketHost(IPC::Sender* message_sender, int id);
72 73
73 // Verifies that the packet |data| has a valid STUN header. In case 74 // Verifies that the packet |data| has a valid STUN header. In case
74 // of success stores type of the message in |type|. 75 // of success stores type of the message in |type|.
75 static bool GetStunPacketType(const char* data, int data_size, 76 static bool GetStunPacketType(const char* data, int data_size,
76 StunMessageType* type); 77 StunMessageType* type);
77 static bool IsRequestOrResponse(StunMessageType type); 78 static bool IsRequestOrResponse(StunMessageType type);
78 79
79 IPC::Sender* message_sender_; 80 IPC::Sender* message_sender_;
80 int id_; 81 int id_;
81 State state_; 82 State state_;
82 83
83 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); 84 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost);
84 }; 85 };
85 86
86 } // namespace content 87 } // namespace content
87 88
88 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ 89 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host.cc » ('j') | content/browser/renderer_host/p2p/socket_host_tcp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698