home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / pascal / 4848 < prev    next >
Encoding:
Text File  |  1992-08-13  |  2.0 KB  |  49 lines

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