It can provide you with a convenient way to test connectivity between peers in a network without the need to create your own project if you only need a quick working example.
At the bottom part of the application we get a message log of what the application is doing or any exceptions that we get if the desired address and port combination is not available for use (it is already in use. After we close an address it is not made available by the OS for some time, so this has to be kept in mind as well).
GitHub repository of the application:
(P2P Sockets Android application)