There is no hardware implementation of a TCP or UDP port or a network socket. That is like asking for a hardware implementation of an IP address. Ports are layer-4 addresses, and they are conceptual. A port represents a software connection between a layer-4 protocol and an application. A network socket consists of a combination of source and destination layer-3 (e.g. IP) and layer-4 (e.g. TCP) addresses.