Because QQ adopts the mixed transmission mode of UDP protocol and TCP protocol, the default communication port is 4000 port dynamic technology. If 4000 is occupied, it will automatically switch to 400 1 port, if 400 1 port is occupied, it will switch to 4002 port, and so on. The same is true for port 8000.
For example, 4000,4001,4002,8000,8001,8002 and so on.
Tencent had few servers in the early days. The earliest servers used 8000 ports. After years of development, it now uses 4000 ports.
According to Tencent's early technical instructions and the principles of modern computer technology, QQ uses UDP port when the message receiver is offline. Both parties are online at the same time, and voice chat, video chat and file transfer use the combination of TCP port and UDP port.