NC is a high level Socket binding for Windows.  It derives from a stripped
down version of Claw.Sockets, with all Claw (, and
most Windows, specific aspects removed.  It's only Windows dependencies
are WSAStartup, WSACleanup, and WSAGetLastError, which should be easily
replaceable for use under Linux, for instance.  A simple example program,
GETJPG.ADB, is included.  This demo fetches a webcam picture and saves it
on disk as pic.jpg

To compile and link the demo program

gnatmake -gnato -O2 getjpg
will compile and link.  It needs access to libwsock32.a, so if it
doesn't find that you'll need to copy it from the Gnat lib directory.

  Create a Console mode project (ie, lkc.bat, not lkw.bat) and do a
make getjpg
You will probably need to add "wsock32.lib" just before the ""
in lkc.bat  Note that Janus, with multiple Ada tasks mapped to a single
Windows thread, needs to use the nc-sockets-alt_gethostbyname.asm instead
of adb to avoid blocking on a DNS lookup.  "make" should automatically
choose the asm over the adb file.

  Create a Console mode project, making sure to include OA\apilib\
in Project/Settings/Search.


GETJPG.ADB                          simple usage example
NC.ADS                              Parent package holding global declarations                      main public spec
nc-sockets.adb                      main body    internals for non-blocking DNS lookup
nc-sockets-alt_gethostbyname.adb    "
nc-sockets-alt_gethostbyname.asm    "             "            public spec for datagrams
nc-sockets-datagrams.adb            body for datagrams

Copyright 2003 Tom Moran  Anyone may use in any way.
No warranties - this code is designed for educational use.