OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "net/tools/flip_server/sm_connection.h" | 5 #include "net/tools/flip_server/sm_connection.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <netinet/tcp.h> | 8 #include <netinet/tcp.h> |
9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
10 | 10 |
11 #include <list> | 11 #include <list> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "net/tools/flip_server/constants.h" | 14 #include "net/tools/flip_server/constants.h" |
15 #include "net/tools/flip_server/flip_config.h" | 15 #include "net/tools/flip_server/flip_config.h" |
16 #include "net/tools/flip_server/http_interface.h" | 16 #include "net/tools/flip_server/http_interface.h" |
17 #include "net/tools/flip_server/spdy_interface.h" | 17 #include "net/tools/flip_server/spdy_interface.h" |
18 #include "net/tools/flip_server/spdy_ssl.h" | 18 #include "net/tools/flip_server/spdy_ssl.h" |
19 #include "net/tools/flip_server/streamer_interface.h" | 19 #include "net/tools/flip_server/streamer_interface.h" |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 | 22 |
23 // static | 23 // static |
24 bool SMConnection::force_spdy_ = false; | 24 bool SMConnection::force_spdy_ = false; |
25 | 25 |
| 26 DataFrame::~DataFrame() { |
| 27 if (delete_when_done) |
| 28 delete[] data; |
| 29 } |
| 30 |
26 SMConnection::SMConnection(EpollServer* epoll_server, | 31 SMConnection::SMConnection(EpollServer* epoll_server, |
27 SSLState* ssl_state, | 32 SSLState* ssl_state, |
28 MemoryCache* memory_cache, | 33 MemoryCache* memory_cache, |
29 FlipAcceptor* acceptor, | 34 FlipAcceptor* acceptor, |
30 std::string log_prefix) | 35 std::string log_prefix) |
31 : last_read_time_(0), | 36 : last_read_time_(0), |
32 fd_(-1), | 37 fd_(-1), |
33 events_(0), | 38 events_(0), |
34 registered_in_epoll_server_(false), | 39 registered_in_epoll_server_(false), |
35 initialized_(false), | 40 initialized_(false), |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 SMConnection* SMConnection::NewSMConnection(EpollServer* epoll_server, | 657 SMConnection* SMConnection::NewSMConnection(EpollServer* epoll_server, |
653 SSLState *ssl_state, | 658 SSLState *ssl_state, |
654 MemoryCache* memory_cache, | 659 MemoryCache* memory_cache, |
655 FlipAcceptor *acceptor, | 660 FlipAcceptor *acceptor, |
656 std::string log_prefix) { | 661 std::string log_prefix) { |
657 return new SMConnection(epoll_server, ssl_state, memory_cache, | 662 return new SMConnection(epoll_server, ssl_state, memory_cache, |
658 acceptor, log_prefix); | 663 acceptor, log_prefix); |
659 } | 664 } |
660 | 665 |
661 } // namespace net | 666 } // namespace net |
662 | |
663 | |
OLD | NEW |