www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/25/03:06:08

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Internet programming
Date: 25 Jan 1998 07:34:32 GMT
Organization: Oxford University, England
Lines: 45
Message-ID: <6aepu8$qjq$1@news.ox.ac.uk>
References: <34CA8EF7 DOT 14ED AT concentric DOT net>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sat, 24 Jan 1998 17:01:43 -0800 in comp.os.msdos.djgpp Chris
F. <cesar AT concentric DOT net> wrote:

: Can someone point me in the right direction of programming internet
: applications with djgpp (ie: What kind of libraries do I need to
: download, maybe a tutorial or some docs)

I only know about doing this under Windows (3.11 or 95).  There are a
variety of libraries available which interface with the Winsock; the
first was Dan Hedlund's wsock library (linked from
http://www.delorie.com/djgpp/dl/elsewhere.html), which is a C++
class-based library.  Then there was my wnsck library, a derivative of
Dan's which is pure C and provides a subset of the standard
Winsock/Berkeley functions -- email me if you're interested in this.
Indrek Mandre released a third library called libsocket, which also
gives Winsock/Berkeley socket functions; I haven't used this last one,
but I think it's more capable than my library.  Mine is quite small.
libsocket is also linked from the delorie URL I gave above.

As for plain DOS, there are several packages available there but I
haven't tried any of them.  Look for WatTCP, again linked from the
above site.

Now tutorials.  I suggest you begin by looking at Berkeley sockets or
Winsock tutorials (the two are very similar) -- they'll teach you the
basics of what sort of things to do.  Then you need to apply them to
the library you choose.  For Indrek's library and my own this will be
simple since the libraries were written to be standard sockets
libraries.  Dan's is slightly different since he uses classes, but
it's very easy to get used to the differences.  I don't know about
WatTCP at all but I expect it uses normal socket routines.

Finally, if your goal is simply to communicate over the internet
between two copies of your program, you might be more interested in
libnet, which will be much easier to learn.  Of course, it's also more
limited -- it can't do a lot of the fancy sockets stuff.  The main
benefit of this is that your code would be portable to different
network types (as and when the libnet drivers are written for them),
e.g. IPX, serial link, etc.  Libnet can also compile for Unices.


Anyway, good luck!  If you have any more questions, just ask.

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


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