VT: Change socket option to REUSEADDR
The last commit to open sockets for RTP is not reliable.
Recorder(Tx)/Player(Rx) opened same port for itself by using SO_REUSEPORT option.
This makes socket ambiguity problem so sometimes received packets flow in Recorder(Tx).
So changed socket option to SO_REUSEADDR and made socket different to solve ambiguity.
Tx sockets are opened for every foreign addresses.
Rx sockets are opened for just callee's addr:port by using connect().
The belows are result of netstat of UE when a call is established to itself.
+-----------------------------------------------------------------------------------+
|C:\> adb shell netstat -ul |
|Active Internet connections (only servers) |
| Proto Recv-Q Send-Q Local Address Foreign Address State |
| udp 327684 0 102.110.231.15:26300 0.0.0.0:* |
| udp 0 0 102.110.231.15:26301 0.0.0.0:* |
+-----------------------------------------------------------------------------------+
BEFORE
+-----------------------------------------------------------------------------------+
|C:\> adb shell netstat -ul |
|Active Internet connections (only servers) |
| Proto Recv-Q Send-Q Local Address Foreign Address State |
| udp 0 0 102.110.231.15:26300 102.110.231.15:26301 ESTABLISHED|
| udp 0 0 102.110.231.15:26301 102.110.231.15:26301 ESTABLISHED|
| udp 0 0 102.110.231.15:26300 0.0.0.0:* |
| udp 0 0 102.110.231.15:26301 0.0.0.0:* |
+-----------------------------------------------------------------------------------+
AFTER
Merged-in: I6d2d50139743c38cd4280120e20511153b2daad3
Change-Id: I6d2d50139743c38cd4280120e20511153b2daad3
Signed-off-by: Kim Sungyeon <sy85.kim@samsung.com>
Loading
Please register or sign in to comment