Re: Control lifecycle thoughts ...



Hi Mark,

On Thu, 25 Oct 2001, Mark McLoughlin wrote:
> > * Creation interaction (A)
> >
> >     1. Control creation
> >     2. Passes it's reference
> >         3.                       _control_frame_new
> >     4.                       creates ControlFrame
> >     5.                       creates Socket
> >     6.                       _control_frame_bind_to_control
> >     7.                       takes a B. Control ref.
> >     8.                       Control->setFrame
> >     9. takes a C. control_frame ref
>
>       This should be a B. ref yes ?

        Argh - sorry, no :-) step 7. should be takes a CORBA Control ref;
such that the steady state referencing looks like this:

        ControlFrame: GObject ref -> Socket
        Socket: Bonobo ref -> ControlFrame

        ControlFrame: CORBA ref -> Control
        ----------------------------------
        Control: CORBA ref -> ControlFrame

        Control: GObject ref -> Plug
        Plug: Bonobo ref -> Control

        ie. there is no Bonobo ref across the CORBA connection - we use
the connection itself to control the lifecycle.

>       In ORBit2 I made the assumption that if there has been a passive
> close on your socket, you get a POLLIN from poll and EOF when you read
> the socket.

        Great - we still get a nice 'broken' signal though I imagine since
we switch the connection state to disconnected when we get a 0 read on a
POLLIN notify IIRC ?

>       I've just hacked up some code to test this assumption - it
> works, for UDS and IP on both Solaris and Linux. The code is attached.

        Great; that's really helpful. Do we get notified of the passive
close quickly using UDS ? [ or even loopback IP ] ? it is a reasonable
thing to use as a lifecycle whatnot ?

>       Note that POLLHUP isn't useful to us because, on a passive
> close, we only get for UDS and only on Linux.

        Yep - thanks for that, noted in the text.

        Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]