PortSpy is both an educational project and a functional utility.
The Port Spy source code is included with the app as an Xcode project. The user receives documented source code that shows how to implement socket based programming in Swift based on the POSIX standard.
As a utility, PortSpy is a man-in-the-middle observer that implements both a server and client such that all data that is transferred from the client to the server (and back) can be monitored.
The data is displayed in the familiar hex/ascii view that is pretty much the standard for byte dumps.
The user is free to use the code any way they like for his own projects. Redistribution of the source code is not allowed though.