private void StartConnecting(bool wait) { Debug.Assert(m_connect); // Choose I/O thread to run connecter in. Given that we are already // running in an I/O thread, there must be at least one available. IOThread ioThread = ChooseIOThread(m_options.Affinity); Debug.Assert(ioThread != null); // Create the connecter object. if (m_addr.Protocol.Equals(Address.TcpProtocol)) { TcpConnecter connecter = new TcpConnecter( ioThread, this, m_options, m_addr, wait); //alloc_Debug.Assert(connecter); LaunchChild(connecter); return; } if (m_addr.Protocol.Equals(Address.IpcProtocol)) { IpcConnecter connecter = new IpcConnecter( ioThread, this, m_options, m_addr, wait); //alloc_Debug.Assert(connecter); LaunchChild(connecter); return; } if (m_addr.Protocol.Equals(Address.PgmProtocol) || m_addr.Protocol.Equals(Address.EpgmProtocol)) { PgmSender pgmSender = new PgmSender(m_ioThread, m_options, m_addr); pgmSender.Init(m_addr.Resolved as PgmAddress); SendAttach(this, pgmSender); return; } Debug.Assert(false); }