my $request
= $self->requests_received->{$tag}
= Tak::Request->new(
- tag => $tag, respond_to => $self
+ tag => $tag, respond_to => $self, respond_with => 'send_response',
);
$handler->start_request($request => @payload);
}
}
sub send_request {
- my ($self, $respond_to, @payload) = @_;
+ my ($self, $respond_to, $respond_with, @payload) = @_;
my $tag = $self->next_serial;
my $request
= $self->requests_sent->{$tag}
= Tak::Request->new(
tag => $tag,
- respond_to => $respond_to
+ respond_to => $respond_to,
+ respond_with => $respond_with,
);
$self->channel->send(REQUEST => $tag => @payload);
return $request;