| 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 #include "remoting/jingle_glue/ssl_socket_adapter.h" | 5 #include "remoting/jingle_glue/ssl_socket_adapter.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "jingle/glue/utils.h" | 10 #include "jingle/glue/utils.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 TransportSocket::~TransportSocket() { | 200 TransportSocket::~TransportSocket() { |
| 201 } | 201 } |
| 202 | 202 |
| 203 int TransportSocket::Connect(net::OldCompletionCallback* callback) { | 203 int TransportSocket::Connect(net::OldCompletionCallback* callback) { |
| 204 // Connect is never called by SSLClientSocket, instead SSLSocketAdapter | 204 // Connect is never called by SSLClientSocket, instead SSLSocketAdapter |
| 205 // calls Connect() on socket_ directly. | 205 // calls Connect() on socket_ directly. |
| 206 NOTREACHED(); | 206 NOTREACHED(); |
| 207 return false; | 207 return false; |
| 208 } | 208 } |
| 209 int TransportSocket::Connect(const net::CompletionCallback& callback) { |
| 210 // Connect is never called by SSLClientSocket, instead SSLSocketAdapter |
| 211 // calls Connect() on socket_ directly. |
| 212 NOTREACHED(); |
| 213 return false; |
| 214 } |
| 209 | 215 |
| 210 void TransportSocket::Disconnect() { | 216 void TransportSocket::Disconnect() { |
| 211 socket_->Close(); | 217 socket_->Close(); |
| 212 } | 218 } |
| 213 | 219 |
| 214 bool TransportSocket::IsConnected() const { | 220 bool TransportSocket::IsConnected() const { |
| 215 return (socket_->GetState() == talk_base::Socket::CS_CONNECTED); | 221 return (socket_->GetState() == talk_base::Socket::CS_CONNECTED); |
| 216 } | 222 } |
| 217 | 223 |
| 218 bool TransportSocket::IsConnectedAndIdle() const { | 224 bool TransportSocket::IsConnectedAndIdle() const { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 write_buffer_len_ = buffer_len; | 381 write_buffer_len_ = buffer_len; |
| 376 return; | 382 return; |
| 377 } | 383 } |
| 378 } | 384 } |
| 379 was_used_to_convey_data_ = true; | 385 was_used_to_convey_data_ = true; |
| 380 callback->RunWithParams(Tuple1<int>(result)); | 386 callback->RunWithParams(Tuple1<int>(result)); |
| 381 } | 387 } |
| 382 } | 388 } |
| 383 | 389 |
| 384 } // namespace remoting | 390 } // namespace remoting |
| OLD | NEW |