Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_TCP_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 const std::vector<char>& data) = 0; | 52 const std::vector<char>& data) = 0; |
| 53 | 53 |
| 54 void WriteOrQueue(scoped_refptr<net::DrainableIOBuffer>& buffer); | 54 void WriteOrQueue(scoped_refptr<net::DrainableIOBuffer>& buffer); |
| 55 void OnPacket(const std::vector<char>& data); | 55 void OnPacket(const std::vector<char>& data); |
| 56 void OnError(); | 56 void OnError(); |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 friend class P2PSocketHostTcpTestBase; | 59 friend class P2PSocketHostTcpTestBase; |
| 60 friend class P2PSocketHostTcpServerTest; | 60 friend class P2PSocketHostTcpServerTest; |
| 61 | 61 |
| 62 bool IsOpen() const; | |
| 63 | |
| 64 // SSL/TLS connection functions. | |
| 65 void StartTls(); | |
|
juberti2
2013/08/07 06:04:21
Suggest naming these similarly, e.g. ProcessTlsCon
Mallinath (Gone from Chromium)
2013/08/07 23:48:19
Done.
| |
| 66 void ProcessSSLConnectDone(int status); | |
| 67 | |
| 62 void DidCompleteRead(int result); | 68 void DidCompleteRead(int result); |
| 63 void DoRead(); | 69 void DoRead(); |
| 64 | 70 |
| 65 void DoWrite(); | 71 void DoWrite(); |
| 66 void HandleWriteResult(int result); | 72 void HandleWriteResult(int result); |
| 67 | 73 |
| 68 // Callbacks for Connect(), Read() and Write(). | 74 // Callbacks for Connect(), Read() and Write(). |
| 69 void OnConnected(int result); | 75 void OnConnected(int result); |
| 70 void OnRead(int result); | 76 void OnRead(int result); |
| 71 void OnWritten(int result); | 77 void OnWritten(int result); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 private: | 128 private: |
| 123 int GetExpectedPacketSize(const char* data, int len, int* pad_bytes); | 129 int GetExpectedPacketSize(const char* data, int len, int* pad_bytes); |
| 124 | 130 |
| 125 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostStunTcp); | 131 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostStunTcp); |
| 126 }; | 132 }; |
| 127 | 133 |
| 128 | 134 |
| 129 } // namespace content | 135 } // namespace content |
| 130 | 136 |
| 131 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ | 137 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ |
| OLD | NEW |