Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ebf1e771 authored by Kim Sungyeon's avatar Kim Sungyeon Committed by Lajos Molnar
Browse files

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: default avatarKim Sungyeon <sy85.kim@samsung.com>
parent 7c5b5c0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment