This is a simple enough change. However, there are no tests for the
streaming functionality, and I need to decide if I want to actually
try to write bindings for them.
I don't have a single clue in heck if this actually works, but it at
least does compile. At some point I will probably add a test or two to
find out how broken this is.
There is a case-sensitivity issue here. The Windows documentation calls
the library Ws2_32, but the mingw cross-compilation on Linux fails
unless it is called `ws3_32`. For some reason, both work on macOS. I
have not tried on Windows, but I assume this will probably work there
due to everything being extremely insensitive (case-wise) on Windows.
This builds a very basic version of the nats.c client (no TLS, no
streaming/jetstream/whatever, since those bring in complex
dependencies and I do not need them at the moment). Right now it
contains a simple test program that demonstrates the functionality
(cool!), but the plan is for the nats.zig to bind the API into a
nicer, zig-like shape and re-export it. Then this becomes a package.
The current function could become a test, though it's a bit complex
for a unit test (and requires connecting to an externally-running NATS
server in order to work).