The Dana standard library has a full set of APIs to support TCP and UDP networking, in blocking and non-blocking modes. It also has full support for TLS (or SSL) sockets.
You can view an extensive set of example programs on the package-level documentation for the network package.