private void AttachPipe([NotNull] Pipe pipe, bool icanhasall = false)
{
// 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);
}
}