home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5758 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: nntp.uio.no!solace!news
  2. From: cmh@lls.se (Magnus Holmgren)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: File/Pipe/Console IO
  5. Date: 18 Mar 1996 20:01:00
  6. Organization: Programmers' Point
  7. Message-ID: <4in30j$53u@fizban.solace.mh.se>
  8. References: <9603171531.AA002ox@etchq.demon.co.uk>
  9. NNTP-Posting-Host: petroc.lls.se
  10. Mime-Version: 1.2
  11. Content-Type: TEXT/PLAIN; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8BIT
  13. X-FTN-To: MushyPea
  14. X-Newsreader: Spot 1.3a #26/NetGate 1.2
  15.  
  16. In a message of 17 Mar 96, MushyPea wrote to :
  17.  
  18.  M> I want to copy any incoming data from input A to output C.
  19.  M> I also want to copy any data from input B to output D.
  20.  M> Most importantly, I want to run both in parallel.
  21.  
  22.  M> How do I go about this?  I've tried using Read()/Write(), but the
  23.  M> program appears to pause at the Read() if there is no input from
  24.  M> one of the inputs, which means that the other input is left
  25.  M> waiting, even if it has data.
  26.  
  27. This is normal DOS behaviour.
  28.  
  29.  M> Can anyone suggest any way of writing a program to transfer data between
  30.  M> two pairs of filehandles simultaneously?  Assembler code would be
  31.  M> preferred, although C/C++ is just as useful.
  32.  
  33. Do asyncronous IO with packets. The asyncio library on aminet can do this
  34. for you, or give you an example on how to do your own implementation (code
  35. is in C).
  36.  
  37. --
  38. Magnus Holmgren - Amiga programmer and enthusiast
  39.  
  40.  
  41.