I want to use Unix sockets for 2 Python programs on the same system to talk to each other.
There are examples of binding to a socket file here: https://gist.github.com/jmhobbs/11276249
The often-used socketserver library also has a UnixStreamServer, and a UnixDatagramServer, which sounds like it deals with unix sockets as well, but there are no examples of either one, and as far as I can tell, it requires an IP and Port, rather than a file when initializing either a UnixStreamServer or UnixDatagramServer.
Are UnixDatagramServer and UnixStreamServer a different type of unix sockets that demonstrated here? Or am I just not seeing how to use them to connect to a socket file properly? Are there examples? Why would someone use UnixDatagramServer/UnixStreamServer over binding to a socket file directly, as in my link?
And when talking about IP sockets, the difference between TCP/UDP makes sense - one is reliable, while the other is not, without the overhead. In a world of sockets, where I assume there's no such thing as unreliable communication, why are there still 2 different types (Datagram vs Stream)?