… | |
… | |
1074 | pe = GEventAPI->new_io (0, 0); |
1074 | pe = GEventAPI->new_io (0, 0); |
1075 | |
1075 | |
1076 | pe->base.callback = (void *)iow_dispatch; |
1076 | pe->base.callback = (void *)iow_dispatch; |
1077 | pe->base.ext_data = (void *)this; |
1077 | pe->base.ext_data = (void *)this; |
1078 | |
1078 | |
1079 | pe->fd = -1; |
1079 | pe->fd = -1; |
1080 | pe->poll = 0; |
1080 | pe->poll = 0; |
1081 | } |
1081 | } |
1082 | |
1082 | |
1083 | iow & |
1083 | iow & |
1084 | iow::fd (int fd) |
1084 | iow::fd (int fd) |
1085 | { |
1085 | { |
… | |
… | |
1095 | } |
1095 | } |
1096 | |
1096 | |
1097 | iow & |
1097 | iow & |
1098 | iow::poll (int events) |
1098 | iow::poll (int events) |
1099 | { |
1099 | { |
|
|
1100 | if (pe->poll != events) |
|
|
1101 | { |
|
|
1102 | if (pe->poll) stop (); |
1100 | pe->poll = events; |
1103 | pe->poll = events; |
|
|
1104 | if (pe->poll) start (); |
|
|
1105 | } |
1101 | |
1106 | |
1102 | return *this; |
1107 | return *this; |
1103 | } |
1108 | } |
1104 | |
1109 | |
1105 | MODULE = cf PACKAGE = cf PREFIX = cf_ |
1110 | MODULE = cf PACKAGE = cf PREFIX = cf_ |