blob: c77088c9557965667323949e4f7627bcaa3e2e1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# test divert-reply with udp with out and in packet
use strict;
use warnings;
use Socket;
our %args = (
protocol => "udp",
client => {
func => sub {
my $self = shift;
write_datagram($self);
read_datagram($self);
},
},
server => {
func => sub {
my $self = shift;
read_datagram($self);
$self->{toaddr} = $self->{fromaddr};
$self->{toport} = $self->{fromport};
write_datagram($self);
},
},
divert => "reply",
);
|