OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/xmpp_socket_adapter.h" | 5 #include "remoting/jingle_glue/xmpp_socket_adapter.h" |
6 | 6 |
7 #include <iomanip> | 7 #include <iomanip> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "remoting/jingle_glue/ssl_adapter.h" | 11 #include "remoting/jingle_glue/ssl_adapter.h" |
12 #include "talk/base/byteorder.h" | 12 #include "third_party/libjingle/source/talk/base/byteorder.h" |
13 #include "talk/base/common.h" | 13 #include "third_party/libjingle/source/talk/base/common.h" |
14 #include "talk/base/firewallsocketserver.h" | 14 #include "third_party/libjingle/source/talk/base/firewallsocketserver.h" |
15 #include "talk/base/logging.h" | 15 #include "third_party/libjingle/source/talk/base/logging.h" |
16 #include "talk/base/socketadapters.h" | 16 #include "third_party/libjingle/source/talk/base/socketadapters.h" |
17 #include "talk/base/ssladapter.h" | 17 #include "third_party/libjingle/source/talk/base/ssladapter.h" |
18 #include "talk/base/thread.h" | 18 #include "third_party/libjingle/source/talk/base/thread.h" |
19 #include "talk/xmpp/xmppengine.h" | 19 #include "third_party/libjingle/source/talk/xmpp/xmppengine.h" |
20 | 20 |
21 namespace remoting { | 21 namespace remoting { |
22 | 22 |
23 XmppSocketAdapter::XmppSocketAdapter(const buzz::XmppClientSettings& xcs, | 23 XmppSocketAdapter::XmppSocketAdapter(const buzz::XmppClientSettings& xcs, |
24 bool allow_unverified_certs) | 24 bool allow_unverified_certs) |
25 : state_(STATE_CLOSED), | 25 : state_(STATE_CLOSED), |
26 error_(ERROR_NONE), | 26 error_(ERROR_NONE), |
27 wsa_error_(0), | 27 wsa_error_(0), |
28 socket_(NULL), | 28 socket_(NULL), |
29 protocol_(xcs.protocol()), | 29 protocol_(xcs.protocol()), |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 int wsa_error = 0; | 419 int wsa_error = 0; |
420 FlushWriteQueue(&error, &wsa_error); | 420 FlushWriteQueue(&error, &wsa_error); |
421 if (error != ERROR_NONE) { | 421 if (error != ERROR_NONE) { |
422 Close(); | 422 Close(); |
423 return false; | 423 return false; |
424 } | 424 } |
425 return true; | 425 return true; |
426 } | 426 } |
427 | 427 |
428 } // namespace remoting | 428 } // namespace remoting |
OLD | NEW |