home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / programm / 4288 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  2.3 KB

  1. Xref: sparky comp.os.os2.programmer:4288 comp.os.os2.networking:1016 comp.os.os2.misc:27589
  2. Newsgroups: comp.os.os2.programmer,comp.os.os2.networking,comp.os.os2.misc
  3. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!nuscc!eletanjm
  4. From: eletanjm@nuscc.nus.sg (TAN JIN MENG)
  5. Subject: Re: Communication between DOS windows
  6. Message-ID: <1992Aug18.061004.19138@nuscc.nus.sg>
  7. Organization: National University of Singapore
  8. References: <92230.152601U55870@uicvm.uic.edu>
  9. Date: Tue, 18 Aug 1992 06:10:04 GMT
  10. Lines: 45
  11.  
  12. In article <92230.152601U55870@uicvm.uic.edu> you write:
  13. :   I am writing a bbs program that will run under ms-dos and will require a
  14. : special term program.  To do this properly, it would seem easiest to hook
  15. : up two machines through the srial prot, and develop the bbs program on one,
  16. : the the term on the other.  However, I do not have two machines at my disposal,
  17. : so I have a problem.  I would like to use os2( I'm using it now anyways ) and
  18. : run the term program in one window, and the bbs program in another.  I can
  19. : develop the software this way, and worry about adding the serial/phone routines
  20. : when the bbs software is completely written/debugged.  Does anyone know of a
  21. : practical way to communicate between DOS windows in os2?  I need to send
  22. : information bolth ways, obviously, just like a bbs and term.  Thank you
  23. : for any help.
  24. : dave
  25.  
  26. I take it you do not want to emulate the actual serial comms - just any byte
  27. stream will do.
  28.  
  29. Well with named pipes, a Dos program can communicate with an OS/2
  30. program. With this as a basis, you can have DOS to DOS comms. Here's 
  31. how it works ...
  32.  
  33. -    run the OS/2 program. It sets up 2 pairs (4) of named pipes.
  34.     call them "\pipe\termread", "\pipe\termwrite", "\pipe\bbsread"
  35.     and "\pipe\bbswrite". I'll refer to them by the short form
  36.     names termread,termwrite,bbsread,bbswrite.
  37.  
  38. -     The OS/2 program is the server for this. It reads from termread
  39.     in order to write to bbswrite and reads from bbsread to write to
  40.     termwrite.
  41.  
  42. -    The DOS term program reads from termwrite and writes to
  43.     termread. The DOS bbs program reads from bbswrite and writes
  44.     to bbsread.
  45.  
  46. That's all. DOS programs can open and use pipes using normal file system
  47. IO calls. Your main problem is writing the probably short OS/2 program
  48. to do this.
  49.  
  50. How's that?
  51.  
  52. hope it helps
  53.  
  54. jin meng
  55.