internal DataPipe GetIocConnection(IPEndPoint iPEndPoint) { DataPipe ioc; lock ( Iocs ) { if (!Iocs.ContainsKey(iPEndPoint)) { ioc = DataPipe.CreateClientTcp(this, iPEndPoint); Iocs.Add(iPEndPoint, ioc); } else { ioc = Iocs[iPEndPoint]; } } return(ioc); }
internal DataPipe GetIocConnection(IPEndPoint iPEndPoint) { DataPipe ioc; lock (Iocs) { //Console.WriteLine("Getting IOC for " + iPEndPoint.ToString()); if (!Iocs.ContainsKey(iPEndPoint)) { //Console.WriteLine("Creating new TCP"); ioc = DataPipe.CreateClientTcp(this, iPEndPoint); Iocs.Add(iPEndPoint, ioc); } else { //Console.WriteLine("Re-using TCP"); ioc = Iocs[iPEndPoint]; } } return(ioc); }