================================================================
BUILD
================================================================
If you have Turbo C and Turbo Make, edit the definition of
TCDIR near the top of the file 'makefile', then type
    make

If you have 16-bit Watcom C and WMAKE, just type
    wmake /f watcom16.mak

If you have Turbo C but not Turbo Make, you may be able to
build the code like this:
    nasm -f obj callsock.asm
    tcc -c -O2 -w -v vxdsock.c

    tcc -c -O2 -w -v tcp-srv.c
    tcc -otcp-srv.exe tcp-srv.obj vxdsock.obj callsock.obj

    tcc -c -O2 -w -v udp-srv.c
    tcc -oudp-srv.exe udp-srv.obj vxdsock.obj callsock.obj

    tcc -c -O2 -w -v udp-cli.c
    tcc -oudp-cli.exe udp-cli.obj vxdsock.obj callsock.obj

If you have 16-bit Watcom C but not WMAKE, you can build
TCP-SRV.EXE like this:
    nasm -f obj callsock.asm -d__WATCOMC__=1
    wcc -zq -s -d2 -hw -ox -w=9 -zc -ms -fr=nul vxdsock.c

    wcc -zq -s -d2 -hw -ox -w=9 -zc -ms -fr=nul tcp-srv.c
    wlink OP q D w a SYS dos N tcp-srv.exe F tcp-srv.obj F vxdsock.obj F callsock.obj
        etc.

================================================================
NOTES
================================================================
This code does not (yet) work with 32-bit DOS compilers like
DJGPP and 32-bit Watcom C.

This code does not (yet) work with Winsock 2 (WSOCK2.VXD; Win98).
ws2_sendto() does not work.

This code does not (yet) contain an implementation of
gethostbyname()

		TCP-	TCP-	UDP-	UDP-	WSOCK	WSOCK2
function	SRV	CLI	SRV	CLI	.VXD	.VXD
--------	----	----	----	----	-----	------
socket()	x	x	x	x	ok	ok
closesocket()	x	x	x	x	ok	ok
select()	x	x	x	x	ok	ok

bind()		x	.	.	x	ok	ok
listen()	x	.	.	.	ok	ok?
accept()	x	.	.	.	ok	ok?
connect()	.	x	.	.	?	?

send()		x	?	.	.	ok	BAD; returns 0; nothing sent
recv()		x	x	.	.	ok	ok?
sendto()	.	.	x	.	ok	BAD; returns 0; nothing sent
recvfrom()	.	.	.	x	ok	ok

Winsock errors I've seen:
10014	WSAEFAULT		invalid pointer argument in function call
				or buffer too small
10022	WSAEINVAL		bad argument to Winsock function
10038	WSAENOTSOCK		bad socket handle passed to Winsock function
10044	WSAESOCKTNOSUPPORT	bad socket type
10047	WSAEAFNOSUPPORT		bad socket family
10048	WSAEADDRINUSE		this combination of protocol/IP address/port
				is already in use
10049	WSAEADDRNOTAVAIL	bad IP address
10055	WSAENOBUFS		bad send()/recv() buffer or buffer chain
10057	WSAENOTCONN		socket is not connected
10065	WSAEHOSTUNREACH		host unreachable

================================================================
SOURCES
================================================================
Berci Gabor's Turbo Pascal code for accessing WSOCK2.VXD
    http://www.phekda.freeserve.co.uk/gabor/ws2dos/
Richard Dawe's notes, documents, sample code, etc:
    http://www.phekda.freeserve.co.uk/richdawe/mysoft.html
Microsoft:
    ftp://ftp.microsoft.com/developr/drg/WinSock/MS-Extensions/wshvxd.zip

================================================================
LICENSE
================================================================
WS2PATCH.C, VXDSOCK.C, SOCKET.H, and CALLSOCK.ASM are based on
Berci Gabor's code, and are GPL. See the file COPYING.

TCP-SRV.C, UDP-SRV.C, UDP-CLI.C are PUBLIC DOMAIN
(no copyright). However, these files are bound by the GPL if
they are linked with VXDSOCK.OBJ and CALLSOCK.OBJ
