Пример #1
0
        private void AttachPipe(Pipe pipe, bool icanhasall)
        {
            //  First, register the pipe so that we can terminate it later on.

            pipe.SetEventSink(this);
            m_pipes.Add(pipe);

            //  Let the derived socket type know about new pipe.
            XAttachPipe(pipe, icanhasall);

            //  If the socket is already being closed, ask any new pipes to terminate
            //  straight away.
            if (IsTerminating)
            {
                RegisterTermAcks(1);
                pipe.Terminate(false);
            }
        }
Пример #2
0
 //  To be used once only, when creating the session.
 public void AttachPipe(Pipe pipe)
 {
     Debug.Assert(!IsTerminating);
     Debug.Assert(m_pipe == null);
     Debug.Assert(pipe != null);
     m_pipe = pipe;
     m_pipe.SetEventSink (this);
 }