🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #2003

Re: Sending objects between processes

#2003
From: Dwight Everhart
Date: Thu, 31 Dec 1992 07:27
28 lines
1994 bytes
In article <C03x19.Jx2@biff.gbdata.com> I write:
>My second (and latest) approach is to use typed streams on ports, and
>send the objects using NXWriteObject() and NXReadObject().  However,
>I'm having a problem opening the typed streams for reading.  When I call 
>NXOpenTypedStream(), it hangs, apparently blocking on the stream.  I
>assumed it was trying to read some header information identifying the
>type or version of the stream, so I had the client send an object before
>the server tried to open the stream.  Same thing happened.

I figured out what was happening here.  NXOpenTypedStream() is trying to read  
something from the stream.  The reason it hung even when the client wrote an  
object before the server opened the stream was because the client didn't  
flush the stream after writing the object.  In fact, it's not necessary to  
write an object.  What is important is calling NXFlushTypedStream() after  
opening a typed stream for writing.  In most cases, NXFlushTypedStream() is  
also needed after a write to a typed stream on a port.

I'm still interested in suggestions for alternative ways of sending objects  
between processes.  I don't think I can use the pasteboard because security  
is important in my system.  I have to be sure that objects are read only by  
the intended processes and that objects are written only by authorized  
processes.

--
Dwight Everhart          "You'd be surprised what you can get used to
Houston, Texas            when your only other choice is Houston"
biff@biff.gbdata.com      -- Chagall Guevara
NeXTMail and MIME OK     
Technical Details
Message-ID: <C044qB.KC4@biff.gbdata.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!sugar!tghost!unkaphaed!biff!biff
References: <C03x19.Jx2@biff.gbdata.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!sugar!tghost!unkaphaed!biff!biff
From: biff@biff.gbdata.com (Dwight Everhart)
Newsgroups: comp.sys.next.programmer
Subject: Re: Sending objects between processes
Message-ID: <C044qB.KC4@biff.gbdata.com>
Date: Thu, 31 Dec 1992 07:27:46 GMT
References: <C03x19.Jx2@biff.gbdata.com>
Sender: biff@biff.gbdata.com (Dwight Everhart)
Lines: 28