public SockSess AddConnect(IPEndPoint ep) { ThreadCheck(false); SockSess retval = SockSess.Connect(ep); if (retval == null) { log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType) .Warn(String.Format("Connected to {0} failed.", ep.ToString())); return(null); } AddSession(retval); return(retval); }