home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / next / programm / 7956 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  1.9 KB

  1. Path: sparky!uunet!psinntp!sugar!tghost!unkaphaed!biff!biff
  2. From: biff@biff.gbdata.com (Dwight Everhart)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: Sending objects between processes
  5. Message-ID: <C044qB.KC4@biff.gbdata.com>
  6. Date: Thu, 31 Dec 1992 07:27:46 GMT
  7. References: <C03x19.Jx2@biff.gbdata.com>
  8. Sender: biff@biff.gbdata.com (Dwight Everhart)
  9. Lines: 28
  10.  
  11. In article <C03x19.Jx2@biff.gbdata.com> I write:
  12. >My second (and latest) approach is to use typed streams on ports, and
  13. >send the objects using NXWriteObject() and NXReadObject().  However,
  14. >I'm having a problem opening the typed streams for reading.  When I call 
  15. >NXOpenTypedStream(), it hangs, apparently blocking on the stream.  I
  16. >assumed it was trying to read some header information identifying the
  17. >type or version of the stream, so I had the client send an object before
  18. >the server tried to open the stream.  Same thing happened.
  19.  
  20. I figured out what was happening here.  NXOpenTypedStream() is trying to read  
  21. something from the stream.  The reason it hung even when the client wrote an  
  22. object before the server opened the stream was because the client didn't  
  23. flush the stream after writing the object.  In fact, it's not necessary to  
  24. write an object.  What is important is calling NXFlushTypedStream() after  
  25. opening a typed stream for writing.  In most cases, NXFlushTypedStream() is  
  26. also needed after a write to a typed stream on a port.
  27.  
  28. I'm still interested in suggestions for alternative ways of sending objects  
  29. between processes.  I don't think I can use the pasteboard because security  
  30. is important in my system.  I have to be sure that objects are read only by  
  31. the intended processes and that objects are written only by authorized  
  32. processes.
  33.  
  34. --
  35. Dwight Everhart          "You'd be surprised what you can get used to
  36. Houston, Texas            when your only other choice is Houston"
  37. biff@biff.gbdata.com      -- Chagall Guevara
  38. NeXTMail and MIME OK     
  39.