Examples of using these program are available on my YouTube playlist: https://www.youtube.com/playlist?list=PLMLm7-g0V0kfJQZ7uIeMSzYvEE7DnJvyD
This code was written to demonstrate networking concepts. Like I tell my students, you can use the code any way you wish, but just don't critisize by coding. :) Most of the time, I start out with a simple idea and make it more complex as I add more to it. This is why it may look a bit like spaghetti code. The comments may or may not be accurate, but they should be... mostly.
I hope you find this helpful.
Have a great day! Rick