OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EPOLL_SERVER_EPOLL_SERVER_H_ | 5 #ifndef NET_TOOLS_EPOLL_SERVER_EPOLL_SERVER_H_ |
6 #define NET_TOOLS_EPOLL_SERVER_EPOLL_SERVER_H_ | 6 #define NET_TOOLS_EPOLL_SERVER_EPOLL_SERVER_H_ |
7 | 7 |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "base/macros.h" | 40 #include "base/macros.h" |
41 #include <sys/epoll.h> | 41 #include <sys/epoll.h> |
42 | 42 |
43 namespace net { | 43 namespace net { |
44 | 44 |
45 class EpollServer; | 45 class EpollServer; |
46 class EpollAlarmCallbackInterface; | 46 class EpollAlarmCallbackInterface; |
47 class ReadPipeCallback; | 47 class ReadPipeCallback; |
48 | 48 |
49 struct EpollEvent { | 49 struct EpollEvent { |
50 EpollEvent(int events, bool is_epoll_wait) | 50 EpollEvent(int events) |
51 : in_events(events), | 51 : in_events(events), |
52 out_ready_mask(0) { | 52 out_ready_mask(0) { |
53 } | 53 } |
54 | 54 |
55 int in_events; // incoming events | 55 int in_events; // incoming events |
56 int out_ready_mask; // the new event mask for ready list (0 means don't | 56 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 | 57 // get on the ready list). This field is always |
58 // initialized to 0 when the event is passed to | 58 // initialized to 0 when the event is passed to |
59 // OnEvent. | 59 // OnEvent. |
60 }; | 60 }; |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 | 1035 |
1036 private: | 1036 private: |
1037 EpollServer::AlarmRegToken token_; | 1037 EpollServer::AlarmRegToken token_; |
1038 EpollServer* eps_; | 1038 EpollServer* eps_; |
1039 bool registered_; | 1039 bool registered_; |
1040 }; | 1040 }; |
1041 | 1041 |
1042 } // namespace net | 1042 } // namespace net |
1043 | 1043 |
1044 #endif // NET_TOOLS_EPOLL_SERVER_EPOLL_SERVER_H_ | 1044 #endif // NET_TOOLS_EPOLL_SERVER_EPOLL_SERVER_H_ |
OLD | NEW |