www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/07/23/07:30:17

From: AYeryomin AT excelsior-usa DOT com (Alex Yeryomin)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: networking library for djgpp
Date: 23 Jul 2002 04:19:25 -0700
Organization: http://groups.google.com/
Lines: 53
Message-ID: <96eb2770.0207230319.3ed24af4@posting.google.com>
References: <20020712110858 DOT 6700 DOT qmail AT web12802 DOT mail DOT yahoo DOT com>
NNTP-Posting-Host: 212.164.176.30
X-Trace: posting.google.com 1027423166 26817 127.0.0.1 (23 Jul 2002 11:19:26 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 23 Jul 2002 11:19:26 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

The best choice in my opinion is WATT-32 networking library. It
supports several Ethernet classes (SLIP, PPP), protocol types (TCP &
UDP). It contains full set of functions to manipulate TCP/IP
connections. The network environment for an application may be
configured via BOOTP, or DHCP server, or simple file WATTCP.CFG, or by
the application itself. The developer can control every network event
with the help WATT-32.

I use WATT-32 for the network in which the server written in MSVC/C++
works under Win2000/NT. Several clients written in DJGPP/C work under
pure DOS. They exchange a lot of data by the network using TCP/IP
sockets and proprietary protocol based on TCP/IP. Also each client
works as extended FTP server, it allows to access to the client
computer with the help of standard ftp. The server supports also RFC
868 time protocol, and the clients periodically synchonize the time by
the server.

There are only one contra I found. The first is that WATT-32 needs a
packet driver to work. As a rule it is not problem to get it for your
network adapter, it should be provided by adapter manufacturer. In my
case I not found such packet driver for my network card. But I got
ndis2pkt driver that may be used as 'shim' between packet driver and
so-called NDIS driver. ndis2pkt driver is only converter from PKT DRVR
interface to NDIS and vice versa. NDIS driver is always included now
in adapter's drivers for any OS. So, WATT-32 works fine over NDIS! As
I know WATT-32 works also under WinNT (you need some special driver
which is free).

Also, the problem was not serious but interesting. The software has
several layers, and base class CONNECTION provides abstract
representation of a connection. It may be TCP/IP, serial port, or
others. It helps to port the software to other OS and programming
systems. For example, the implementation class DOS_TCPIP_CONNECTION
uses Watt-32's sockets to establish real connection. It contains the
member of Watt-32's tcp_Socket type. But we cannot to duplicate an
object of the class DOS_TCPIP_CONNECTION because Watt-32's
socket-oriented function often take an address of passed socket to
identify sockets globally by their addresses. So if a socket is the
local variable and it is opened within some function, it should be
used only within this function, or to be a static variable. A program
cannot copy already opened socket to another destination without of
risk to fall down. But there is simple solution - we allocate any
socket variable in global memory before using the Watt-32
socket-oriented functions for it. It works fine!

Again, WATT-32 is proving itself very good in comparing with others
free (and commercial) TCP/IP libraries. Gisle Vanem the author of
WATT-32 always  helped me (and I hope he is ready to help you!) to use
WATT-32 in right way.

Best regards,

WATT-32 pleased developer Alex. :-)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019