| 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 #ifndef NET_TOOLS_FLIP_SERVER_SM_CONNECTION_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_SM_CONNECTION_H_ |
| 6 #define NET_TOOLS_FLIP_SERVER_SM_CONNECTION_H_ | 6 #define NET_TOOLS_FLIP_SERVER_SM_CONNECTION_H_ |
| 7 | 7 |
| 8 #include <arpa/inet.h> // in_addr_t | 8 #include <arpa/inet.h> // in_addr_t |
| 9 #include <time.h> | 9 #include <time.h> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 struct SSLState; | 25 struct SSLState; |
| 26 | 26 |
| 27 // A frame of data to be sent. | 27 // A frame of data to be sent. |
| 28 class DataFrame { | 28 class DataFrame { |
| 29 public: | 29 public: |
| 30 const char* data; | 30 const char* data; |
| 31 size_t size; | 31 size_t size; |
| 32 bool delete_when_done; | 32 bool delete_when_done; |
| 33 size_t index; | 33 size_t index; |
| 34 DataFrame() : data(NULL), size(0), delete_when_done(false), index(0) {} | 34 DataFrame() : data(NULL), size(0), delete_when_done(false), index(0) {} |
| 35 virtual ~DataFrame() { | 35 virtual ~DataFrame(); |
| 36 if (delete_when_done) | |
| 37 delete[] data; | |
| 38 } | |
| 39 }; | 36 }; |
| 40 | 37 |
| 41 typedef std::list<DataFrame*> OutputList; | 38 typedef std::list<DataFrame*> OutputList; |
| 42 | 39 |
| 43 class SMConnection : public SMConnectionInterface, | 40 class SMConnection : public SMConnectionInterface, |
| 44 public EpollCallbackInterface, | 41 public EpollCallbackInterface, |
| 45 public NotifierInterface { | 42 public NotifierInterface { |
| 46 public: | 43 public: |
| 47 virtual ~SMConnection(); | 44 virtual ~SMConnection(); |
| 48 | 45 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 size_t max_bytes_sent_per_dowrite_; | 150 size_t max_bytes_sent_per_dowrite_; |
| 154 | 151 |
| 155 SSL* ssl_; | 152 SSL* ssl_; |
| 156 | 153 |
| 157 static bool force_spdy_; | 154 static bool force_spdy_; |
| 158 }; | 155 }; |
| 159 | 156 |
| 160 } // namespace net | 157 } // namespace net |
| 161 | 158 |
| 162 #endif // NET_TOOLS_FLIP_SERVER_SM_CONNECTION_H_ | 159 #endif // NET_TOOLS_FLIP_SERVER_SM_CONNECTION_H_ |
| 163 | |
| OLD | NEW |