When I request X forwarding from SSH server, then SSH server sets a $DISPLAY variable with value localhost:10.0. In addition, it starts to listen on 127.0.0.1 port 6010(and also ::1 port 6010 for IPv6):
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 127.0.0.1:6010 *:* users:(("sshd",pid=11405,fd=10))
How do X clients know that they will need to connect to TCP port 6010? Does this work in a way that by default they connect to TCP port 6000+<display number> and as display number is in this example 10, then they will connect to TCP port 6010?