Chromium Code Reviews| Index: content/browser/renderer_host/p2p/socket_host_tcp.h |
| =================================================================== |
| --- content/browser/renderer_host/p2p/socket_host_tcp.h (revision 205587) |
| +++ content/browser/renderer_host/p2p/socket_host_tcp.h (working copy) |
| @@ -25,9 +25,11 @@ |
| namespace content { |
| +class SsltcpHelper; |
| + |
| class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost { |
| public: |
| - P2PSocketHostTcpBase(IPC::Sender* message_sender, int id); |
| + P2PSocketHostTcpBase(IPC::Sender* message_sender, int id, bool ssl); |
|
Sergey Ulanov
2013/06/18 20:01:26
can you please define some enum (e.g. SslMode) wit
Ronghua Wu (Left Chromium)
2013/06/18 22:19:48
Reused P2PSocketType.
|
| virtual ~P2PSocketHostTcpBase(); |
| bool InitAccepted(const net::IPEndPoint& remote_address, |
| @@ -51,6 +53,12 @@ |
| void OnPacket(const std::vector<char>& data); |
| void OnError(); |
| + int MaybeHandleSslHello(char** cur, int* cur_len, int* consumed); |
| + |
| + scoped_ptr<SsltcpHelper> ssltcp_helper_; |
|
Sergey Ulanov
2013/06/18 20:01:26
does this need to be protected? I think P2PSocketH
|
| + |
| + net::IPEndPoint remote_address_; |
|
Sergey Ulanov
2013/06/18 20:01:26
This still can private.
|
| + |
| private: |
| friend class P2PSocketHostTcpTest; |
| friend class P2PSocketHostTcpServerTest; |
| @@ -67,8 +75,6 @@ |
| void OnRead(int result); |
| void OnWritten(int result); |
| - net::IPEndPoint remote_address_; |
| - |
| scoped_ptr<net::StreamSocket> socket_; |
| scoped_refptr<net::GrowableIOBuffer> read_buffer_; |
| std::queue<scoped_refptr<net::DrainableIOBuffer> > write_queue_; |
| @@ -83,7 +89,7 @@ |
| class CONTENT_EXPORT P2PSocketHostTcp : public P2PSocketHostTcpBase { |
| public: |
| - P2PSocketHostTcp(IPC::Sender* message_sender, int id); |
| + P2PSocketHostTcp(IPC::Sender* message_sender, int id, bool ssl); |
| virtual ~P2PSocketHostTcp(); |
| protected: |
| @@ -100,7 +106,7 @@ |
| // Formatting of messages is defined in RFC5766. |
| class CONTENT_EXPORT P2PSocketHostStunTcp : public P2PSocketHostTcpBase { |
| public: |
| - P2PSocketHostStunTcp(IPC::Sender* message_sender, int id); |
| + P2PSocketHostStunTcp(IPC::Sender* message_sender, int id, bool ssl); |
| virtual ~P2PSocketHostStunTcp(); |
| protected: |