|
|
|
|
@ -42,6 +42,11 @@ sub mux_input {
|
|
|
|
|
my ($self, $mux, $fh, $input) = @_;
|
|
|
|
|
my $peer = $mux->udp_peer($fh);
|
|
|
|
|
$dtls->input($fh, $input, $peer);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
sub mux_timeout {
|
|
|
|
|
my ($self, $mux, $fh) = @_;
|
|
|
|
|
$mux->set_timeout($fh, 1);
|
|
|
|
|
|
|
|
|
|
for my $comp (@$dtls) {
|
|
|
|
|
$comp->{_connected} or return;
|
|
|
|
|
@ -116,6 +121,7 @@ is($port_a, $port_ax, 'rtcp-mux');
|
|
|
|
|
|
|
|
|
|
# passive connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -251,6 +257,7 @@ is($port_a, $port_ax, 'rtcp-mux');
|
|
|
|
|
|
|
|
|
|
# passive connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -386,6 +393,7 @@ is($port_a, $port_ax, 'rtcp-mux');
|
|
|
|
|
|
|
|
|
|
# passive connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -521,6 +529,7 @@ is($port_a, $port_ax, 'rtcp-mux');
|
|
|
|
|
|
|
|
|
|
# active connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -648,6 +657,7 @@ is($port_a, $port_ax, 'rtcp-mux');
|
|
|
|
|
|
|
|
|
|
# active connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -774,6 +784,7 @@ is($port_a, $port_ax, 'rtcp-mux');
|
|
|
|
|
|
|
|
|
|
# passive connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->accept();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -899,6 +910,7 @@ SDP
|
|
|
|
|
|
|
|
|
|
# active connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -1036,6 +1048,7 @@ SDP
|
|
|
|
|
|
|
|
|
|
# active connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -1174,6 +1187,7 @@ SDP
|
|
|
|
|
|
|
|
|
|
# passive connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->accept();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -1306,6 +1320,7 @@ rcv_no($sock_a);
|
|
|
|
|
|
|
|
|
|
# active connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -1438,6 +1453,7 @@ rcv_no($sock_a);
|
|
|
|
|
|
|
|
|
|
# active connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -1567,6 +1583,7 @@ rcv($sock_a, -1, qr/^\x01\x01\x00.\x21\x12\xa4\x42(............)\x80\x22\x00.rtp
|
|
|
|
|
|
|
|
|
|
# active connect
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $port_a]);
|
|
|
|
|
$dtls->connect();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -1618,6 +1635,7 @@ snd($sock_a, $ret1[0], NGCP::Rtpclient::ICE::stun_succ($ret1[0], $ret1[2], 'bd5e
|
|
|
|
|
|
|
|
|
|
# passive connect (accept) DTLS
|
|
|
|
|
$mux->add($sock_a);
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
@components = ([$sock_a, $ret1[0]]);
|
|
|
|
|
$dtls->accept();
|
|
|
|
|
$mux->loop();
|
|
|
|
|
@ -1635,6 +1653,7 @@ $mux->add($sock_a);
|
|
|
|
|
$mux->add($sock_ax);
|
|
|
|
|
$dtls = NGCP::Rtpclient::DTLS::Group->new($mux, $dtls_func, [[$sock_a], [$sock_ax]]);
|
|
|
|
|
$fingerprint = $dtls->[0]->fingerprint();
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
|
|
|
|
|
($port_a, $port_ax) = offer('DTLS bkw', { 'transport-protocol' => 'RTP/AVP' }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
@ -1699,6 +1718,7 @@ $mux->add($sock_b);
|
|
|
|
|
$mux->add($sock_bx);
|
|
|
|
|
$dtls = NGCP::Rtpclient::DTLS::Group->new($mux, $dtls_func, [[$sock_b], [$sock_bx]]);
|
|
|
|
|
$fingerprint = $dtls->[0]->fingerprint();
|
|
|
|
|
$mux->set_timeout($sock_b, 1);
|
|
|
|
|
|
|
|
|
|
($port_a, $port_ax) = offer('DTLS fwd', { 'transport-protocol' => 'RTP/SAVP', SDES => 'off' }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
@ -1767,6 +1787,7 @@ $mux->add($sock_a);
|
|
|
|
|
$mux->add($sock_ax);
|
|
|
|
|
$dtls = NGCP::Rtpclient::DTLS::Group->new($mux, $dtls_func, [[$sock_a], [$sock_ax]]);
|
|
|
|
|
$fingerprint = $dtls->[0]->fingerprint();
|
|
|
|
|
$mux->set_timeout($sock_a, 1);
|
|
|
|
|
|
|
|
|
|
($port_a, $port_ax, $port_c, $port_cx) = offer('bundle DTLS bkw', { 'transport-protocol' => 'RTP/AVP', bundle => ['accept'] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
|