OLD | NEW |
1 // Copyright (c) 2009 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 #ifndef NET_TOOLS_FLIP_SERVER_EPOLL_SERVER_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_EPOLL_SERVER_H_ |
6 #define NET_TOOLS_FLIP_SERVER_EPOLL_SERVER_H_ | 6 #define NET_TOOLS_FLIP_SERVER_EPOLL_SERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <sys/queue.h> | 10 #include <sys/queue.h> |
11 #include <ext/hash_map> // it is annoying that gcc does this. oh well. | 11 #include <ext/hash_map> // it is annoying that gcc does this. oh well. |
(...skipping 25 matching lines...) Expand all Loading... |
37 | 37 |
38 #include "base/basictypes.h" | 38 #include "base/basictypes.h" |
39 #include "base/scoped_ptr.h" | 39 #include "base/scoped_ptr.h" |
40 #include <sys/epoll.h> | 40 #include <sys/epoll.h> |
41 | 41 |
42 namespace net { | 42 namespace net { |
43 | 43 |
44 class EpollServer; | 44 class EpollServer; |
45 class EpollAlarmCallbackInterface; | 45 class EpollAlarmCallbackInterface; |
46 class ReadPipeCallback; | 46 class ReadPipeCallback; |
47 class WatchDogToken; | |
48 | 47 |
49 struct EpollEvent { | 48 struct EpollEvent { |
50 EpollEvent(int events, bool is_epoll_wait) | 49 EpollEvent(int events, bool is_epoll_wait) |
51 : in_events(events), | 50 : in_events(events), |
52 out_ready_mask(0) { | 51 out_ready_mask(0) { |
53 } | 52 } |
54 | 53 |
55 int in_events; // incoming events | 54 int in_events; // incoming events |
56 int out_ready_mask; // the new event mask for ready list (0 means don't | 55 int out_ready_mask; // the new event mask for ready list (0 means don't |
57 // get on the ready list). This field is always | 56 // get on the ready list). This field is always |
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 private: | 1063 private: |
1065 EpollServer::AlarmRegToken token_; | 1064 EpollServer::AlarmRegToken token_; |
1066 EpollServer* eps_; | 1065 EpollServer* eps_; |
1067 bool registered_; | 1066 bool registered_; |
1068 }; | 1067 }; |
1069 | 1068 |
1070 } // namespace net | 1069 } // namespace net |
1071 | 1070 |
1072 #endif // NET_TOOLS_FLIP_SERVER_EPOLL_SERVER_H_ | 1071 #endif // NET_TOOLS_FLIP_SERVER_EPOLL_SERVER_H_ |
1073 | 1072 |
OLD | NEW |