| 1 | use v5.40; | ||
| 2 | use feature 'class'; | ||
| 3 | no warnings 'experimental::class'; | ||
| 4 | class Net::BitTorrent::Protocol::HandshakeOnly v2.0.0 : isa(Net::BitTorrent::Protocol::BEP03) { | ||
| 5 | field $on_handshake_cb : param; | ||
| 6 | ADJUST { | ||
| 7 | $self->on( handshake => sub ( $self, $ih, $id ) { $on_handshake_cb->( $ih, $id ) } ); | ||
| 8 | } | ||
| 9 | } 1; |