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 REMOTING_JINGLE_GLUE_SSL_SOCKET_ADAPTER_H_ | 5 #ifndef REMOTING_JINGLE_GLUE_SSL_SOCKET_ADAPTER_H_ |
6 #define REMOTING_JINGLE_GLUE_SSL_SOCKET_ADAPTER_H_ | 6 #define REMOTING_JINGLE_GLUE_SSL_SOCKET_ADAPTER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "net/base/completion_callback.h" | 9 #include "net/base/completion_callback.h" |
10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 virtual int64 NumBytesRead() const OVERRIDE; | 55 virtual int64 NumBytesRead() const OVERRIDE; |
56 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; | 56 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
57 | 57 |
58 // net::Socket implementation. | 58 // net::Socket implementation. |
59 virtual int Read(net::IOBuffer* buf, int buf_len, | 59 virtual int Read(net::IOBuffer* buf, int buf_len, |
60 net::OldCompletionCallback* callback) OVERRIDE; | 60 net::OldCompletionCallback* callback) OVERRIDE; |
61 virtual int Read(net::IOBuffer* buf, int buf_len, | 61 virtual int Read(net::IOBuffer* buf, int buf_len, |
62 const net::CompletionCallback& callback) OVERRIDE; | 62 const net::CompletionCallback& callback) OVERRIDE; |
63 virtual int Write(net::IOBuffer* buf, int buf_len, | 63 virtual int Write(net::IOBuffer* buf, int buf_len, |
64 net::OldCompletionCallback* callback) OVERRIDE; | 64 net::OldCompletionCallback* callback) OVERRIDE; |
| 65 virtual int Write(net::IOBuffer* buf, int buf_len, |
| 66 const net::CompletionCallback& callback) OVERRIDE; |
65 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 67 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
66 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 68 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
67 | 69 |
68 private: | 70 private: |
69 friend class SSLSocketAdapter; | 71 friend class SSLSocketAdapter; |
70 | 72 |
71 void OnReadEvent(talk_base::AsyncSocket* socket); | 73 void OnReadEvent(talk_base::AsyncSocket* socket); |
72 void OnWriteEvent(talk_base::AsyncSocket* socket); | 74 void OnWriteEvent(talk_base::AsyncSocket* socket); |
73 | 75 |
74 net::OldCompletionCallback* old_read_callback_; | 76 net::OldCompletionCallback* old_read_callback_; |
75 net::CompletionCallback read_callback_; | 77 net::CompletionCallback read_callback_; |
76 net::OldCompletionCallback* write_callback_; | 78 net::OldCompletionCallback* old_write_callback_; |
| 79 net::CompletionCallback write_callback_; |
77 | 80 |
78 scoped_refptr<net::IOBuffer> read_buffer_; | 81 scoped_refptr<net::IOBuffer> read_buffer_; |
79 int read_buffer_len_; | 82 int read_buffer_len_; |
80 scoped_refptr<net::IOBuffer> write_buffer_; | 83 scoped_refptr<net::IOBuffer> write_buffer_; |
81 int write_buffer_len_; | 84 int write_buffer_len_; |
82 | 85 |
83 net::BoundNetLog net_log_; | 86 net::BoundNetLog net_log_; |
84 | 87 |
85 talk_base::AsyncSocket *socket_; | 88 talk_base::AsyncSocket *socket_; |
86 talk_base::SocketAddress addr_; | 89 talk_base::SocketAddress addr_; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 IOState write_state_; | 154 IOState write_state_; |
152 scoped_refptr<net::IOBuffer> transport_buf_; | 155 scoped_refptr<net::IOBuffer> transport_buf_; |
153 int data_transferred_; | 156 int data_transferred_; |
154 | 157 |
155 DISALLOW_COPY_AND_ASSIGN(SSLSocketAdapter); | 158 DISALLOW_COPY_AND_ASSIGN(SSLSocketAdapter); |
156 }; | 159 }; |
157 | 160 |
158 } // namespace remoting | 161 } // namespace remoting |
159 | 162 |
160 #endif // REMOTING_JINGLE_GLUE_SSL_SOCKET_ADAPTER_H_ | 163 #endif // REMOTING_JINGLE_GLUE_SSL_SOCKET_ADAPTER_H_ |
OLD | NEW |