| 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_ACCEPTOR_THREAD_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_ACCEPTOR_THREAD_H_ |
| 6 #define NET_TOOLS_FLIP_SERVER_ACCEPTOR_THREAD_H_ | 6 #define NET_TOOLS_FLIP_SERVER_ACCEPTOR_THREAD_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 bool value_; | 40 bool value_; |
| 41 base::Lock lock_; | 41 base::Lock lock_; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 class SMAcceptorThread : public base::SimpleThread, | 44 class SMAcceptorThread : public base::SimpleThread, |
| 45 public EpollCallbackInterface, | 45 public EpollCallbackInterface, |
| 46 public SMConnectionPoolInterface { | 46 public SMConnectionPoolInterface { |
| 47 public: | 47 public: |
| 48 SMAcceptorThread(FlipAcceptor *acceptor, MemoryCache* memory_cache); | 48 SMAcceptorThread(FlipAcceptor *acceptor, MemoryCache* memory_cache); |
| 49 ~SMAcceptorThread(); | 49 virtual ~SMAcceptorThread(); |
| 50 | 50 |
| 51 // EpollCallbackInteface interface | 51 // EpollCallbackInteface interface |
| 52 virtual void OnRegistration(EpollServer* eps, int fd, int event_mask) {} | 52 virtual void OnRegistration(EpollServer* eps, int fd, int event_mask) {} |
| 53 virtual void OnModification(int fd, int event_mask) {} | 53 virtual void OnModification(int fd, int event_mask) {} |
| 54 virtual void OnEvent(int fd, EpollEvent* event); | 54 virtual void OnEvent(int fd, EpollEvent* event); |
| 55 virtual void OnUnregistration(int fd, bool replaced) {} | 55 virtual void OnUnregistration(int fd, bool replaced) {} |
| 56 virtual void OnShutdown(EpollServer* eps, int fd) {} | 56 virtual void OnShutdown(EpollServer* eps, int fd) {} |
| 57 | 57 |
| 58 // SMConnectionPool interface | 58 // SMConnectionPool interface |
| 59 virtual void SMConnectionDone(SMConnection* sc); | 59 virtual void SMConnectionDone(SMConnection* sc); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 85 std::vector<SMConnection*> tmp_unused_server_connections_; | 85 std::vector<SMConnection*> tmp_unused_server_connections_; |
| 86 std::vector<SMConnection*> allocated_server_connections_; | 86 std::vector<SMConnection*> allocated_server_connections_; |
| 87 std::list<SMConnection*> active_server_connections_; | 87 std::list<SMConnection*> active_server_connections_; |
| 88 Notification quitting_; | 88 Notification quitting_; |
| 89 MemoryCache* memory_cache_; | 89 MemoryCache* memory_cache_; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace net | 92 } // namespace net |
| 93 | 93 |
| 94 #endif // NET_TOOLS_FLIP_SERVER_ACCEPTOR_THREAD_H_ | 94 #endif // NET_TOOLS_FLIP_SERVER_ACCEPTOR_THREAD_H_ |
| 95 | |
| OLD | NEW |