private static void Open(IPhysicalConnection conn) { IAsyncResult res = conn.BeginOpen(null); Async.WaitFor(res); conn.EndOpen(res); }
public void Connect() { if (!EnabledConnect()) { return; } m_connecting = true; CallRefresh(); ProcessRegister.AddBackgroundTask("s_connect"); m_conn.BeginOpen(Async.CreateInvokeCallback(RealNode.Invoker, (AsyncCallback)Connected)); }
protected void CallOpen() { if (m_connFact == null) { Opened(null); return; } m_conn = ConnPack.GetConnection(m_connFact, true); if (ConnPack.IsOpened(m_connFact)) { Opened(null); } else { m_conn.BeginOpen(Async.CreateInvokeCallback(m_invoker, Opened)); } }