Oct 10, 2018

TCP and UDP protocols work based on port numbers used for establishing connection. Any application or a service that needs to establish a TCP/UDP connection will require a port on its side. There are two types of ports: Ephemeral ports, which are usually dynamic ports, UDP - Client and Server example programs in Python An UDP client can send "n" number of distinct packets to an UDP server and it could also receive "n" number of distinct packets as replies from the UDP server. Since UDP is connectionless protocol the overhead involved in UDP is less compared to a connection based protocol like TCP. sockets - C# Using tcp and udp protocols - Stack Overflow The thing is that listener.AcceptTcpClient() blocks your current thread and UdpClient on server side is not established before Tcp connection created. In fact, your server is waiting for Tcp connection and only after that starting listening of Udp connections, while your client creates 2 connections one by one.

linux - Iptables: "-p udp --state ESTABLISHED" - Server Fault

Even faster connection establishment with QUIC 0-RTT

TCP Connection Establish and Terminate - Tutorial

UDP - Client and Server example programs in Python An UDP client can send "n" number of distinct packets to an UDP server and it could also receive "n" number of distinct packets as replies from the UDP server. Since UDP is connectionless protocol the overhead involved in UDP is less compared to a connection based protocol like TCP.