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

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

Issue 7529039: Properly handle STUN requests and responses from relay servers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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 | Annotate | Revision Log
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/p2p_sockets.h" 8 #include "content/common/p2p_sockets.h"
9 9
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 STATE_OPEN, 55 STATE_OPEN,
56 STATE_ERROR, 56 STATE_ERROR,
57 }; 57 };
58 58
59 P2PSocketHost(IPC::Message::Sender* message_sender, int routing_id, int id); 59 P2PSocketHost(IPC::Message::Sender* message_sender, int routing_id, int id);
60 60
61 // Verifies that the packet |data| has a valid STUN header. In case 61 // Verifies that the packet |data| has a valid STUN header. In case
62 // of success stores type of the message in |type|. 62 // of success stores type of the message in |type|.
63 static bool GetStunPacketType(const char* data, int data_size, 63 static bool GetStunPacketType(const char* data, int data_size,
64 StunMessageType* type); 64 StunMessageType* type);
65 static bool IsRequestOrResponse(StunMessageType type);
65 66
66 IPC::Message::Sender* message_sender_; 67 IPC::Message::Sender* message_sender_;
67 int routing_id_; 68 int routing_id_;
68 int id_; 69 int id_;
69 State state_; 70 State state_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); 72 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost);
72 }; 73 };
73 74
74 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ 75 #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