So the first thing to note is that they're talking about ports as "layer 4 addresses" and multiplexing multiple application streams onto a single port, and demultiplexing multiple distinct transmissions on the receiver side.
As you'd expect, this only works with some caveats depending on the uniqueness of the ports/L4 addressing.
So a UDP socket bound in non-exclusive mode can have multiple applications which all send from the same L4 address/port. I don't remember anything in the BSD API on the receiver side to filter datagrams based on the source port, but I could be wrong---if there isn't, you're going to have to manually demux it on a higher level than the stack than L4, which isn't what the article is talking about.
With TCP, the server (bind()) socket can be combined with accept() to allow multiple simultaneous connections to the same L4 destination (port), but they must have different client (source) ports. I also don't know of any implementation of the BSD sockets API that will allow multiple TCP client sockets to bind to the same local port, because the TCP server (receiver) can only demux the stream because of differing source ports.
In other words, mux/demux at L4 with UDP or TCP only works in 50% of your cases, and never in both directions at the same time