… | |
… | |
232 | } |
232 | } |
233 | |
233 | |
234 | sub monitor { |
234 | sub monitor { |
235 | my ($self, $portid, $cb) = @_; |
235 | my ($self, $portid, $cb) = @_; |
236 | |
236 | |
237 | return $cb->(no_such_port => "cannot monitor nonexistent port") |
237 | return $cb->(no_such_port => "cannot monitor nonexistent port", "$self->{id}#$portid") |
238 | unless exists $AnyEvent::MP::Kernel::PORT{$portid}; |
238 | unless exists $AnyEvent::MP::Kernel::PORT{$portid}; |
239 | |
239 | |
240 | $AnyEvent::MP::Kernel::LMON{$portid}{$cb+0} = $cb; |
240 | $AnyEvent::MP::Kernel::LMON{$portid}{$cb+0} = $cb; |
241 | } |
241 | } |
242 | |
242 | |