home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!usc!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!s.psych.uiuc.edu!amead
- From: amead@s.psych.uiuc.edu (Alan Mead)
- Subject: Re: Network Programming....
- References: <12AUG199221531849@gergo.tamu.edu>
- Message-ID: <Bsyp8w.Hu8@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: UIUC Department of Psychology
- Date: Fri, 14 Aug 1992 07:10:07 GMT
- Keywords: Netbios Netware TCP/IP
- Lines: 36
-
- chris@gergo.tamu.edu (Chris King) writes:
-
- >Does anyone out there know how to program networks with Turbo Pascal,
- >and If so are you willing to share the information.
-
- >Chris King
- >Chris@gerga.tamu.edu
-
-
- Hmm. I was pondering this the other day. If I understand correctly,
- there are at least two ways to program network applications. The
- first is to replicate somethig like the network software (ie, your
- code in intimately knowledgeable about the hardware and two copies
- of your code communicate directly). That's a f&*(&ing nightmare.
-
- [There may be a middle ground I'm skippeing.]
-
- On the other hand, I think most PC networks work by creating a shared
- drive common to all computers. So a simple application can be built
- just by using a common file as a semaphore.
-
- You pick a filename. Your programs communicate by writing data to that
- file on the shared disk. Each program keeps track of the "status" of
- the semaphore file and when its changed, that means the other copy is
- trying to send a message.
-
- Is this clear? In the book _Advanced Turbo Pascal Techniques_ by
- Ohlsen and Stoker, they present a chapter on network programming and
- some sort of game. I only glanced at it, however, not having a network
- to experiment on :(
-
- Oh, there is a serious problem with the semephore model (as I see it).
- The DOS time stamp is actually only accurate to *TWO* seconds (they
- fold all the time data into two bytes by only using 5 bits for the
- seconds). So I don't know what happens if the file gets updated more
- often than once every 2 seconds.
-