As mentioned here and here, the usage of TcpListener ist not possible in UWP. Instead, StreamSocketListener has to be used.
But after a relatively long research, I didn't understand why?
Since UWP is actually a subset of of .NET Core, using TcpListener should be possible in UWP also!
Just for testing, I even created a UWP project, tried to use System.Net.Sockets.TcpListener in the code and there was no problem. I didn't write the complete code and didn't try to run the server, but only tried to reference System.Net.Sockets.TcpListener from within a UWP project and this was possible. And no wonder because even according to Microsoft docs (https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.tcplistener?view=netcore-1.0) the class is available starting from .NET Core 1.0.