… | |
… | |
2055 | |
2055 | |
2056 | $term->{socket} = ... |
2056 | $term->{socket} = ... |
2057 | $term->{iow} = urxvt::iow |
2057 | $term->{iow} = urxvt::iow |
2058 | ->new |
2058 | ->new |
2059 | ->fd (fileno $term->{socket}) |
2059 | ->fd (fileno $term->{socket}) |
2060 | ->events (urxvt::EVENT_READ) |
2060 | ->events (urxvt::EV_READ) |
2061 | ->start |
2061 | ->start |
2062 | ->cb (sub { |
2062 | ->cb (sub { |
2063 | my ($iow, $revents) = @_; |
2063 | my ($iow, $revents) = @_; |
2064 | # $revents must be 1 here, no need to check |
2064 | # $revents must be 1 here, no need to check |
2065 | sysread $term->{socket}, my $buf, 8192 |
2065 | sysread $term->{socket}, my $buf, 8192 |
… | |
… | |
2083 | Set the file descriptor (not handle) to watch. |
2083 | Set the file descriptor (not handle) to watch. |
2084 | |
2084 | |
2085 | =item $iow = $iow->events ($eventmask) |
2085 | =item $iow = $iow->events ($eventmask) |
2086 | |
2086 | |
2087 | Set the event mask to watch. The only allowed values are |
2087 | Set the event mask to watch. The only allowed values are |
2088 | C<urxvt::EVENT_READ> and C<urxvt::EVENT_WRITE>, which might be ORed |
2088 | C<urxvt::EV_READ> and C<urxvt::EV_WRITE>, which might be ORed |
2089 | together, or C<urxvt::EVENT_NONE>. |
2089 | together, or C<urxvt::EV_NONE>. |
2090 | |
2090 | |
2091 | =item $iow = $iow->start |
2091 | =item $iow = $iow->start |
2092 | |
2092 | |
2093 | Start watching for requested events on the given handle. |
2093 | Start watching for requested events on the given handle. |
2094 | |
2094 | |