public static void ProcConn(object conobj) { connect_info c = (connect_info) conobj; P2P_C_S_Exchange p2p = new P2P_C_S_Exchange(ref c.Soket_); p2p.Start(); Console.WriteLine("out"); lock (con) con.Remove(c); }
private static void Socket_Accept() { while (true) { connect_info swe = new connect_info(); swe.Soket_ = sock.Accept(); swe.th = new Thread(ProcConn); swe.th.IsBackground = true; swe.th.Start(swe); lock (con) { con.Add(swe); } } }