static void OpenNetworkRepository(string[] commandParts) { string nick = commandParts [2]; string ip = commandParts [3]; string port = commandParts [4]; System.Net.Sockets.TcpClient TC = new System.Net.Sockets.TcpClient(); TC.Connect(new System.Net.IPEndPoint(System.Net.IPAddress.Parse(ip), int.Parse(port))); BD2.Chunk.ChunkRepository LRepo = new BD2.Repo.Net.Repository(TC.GetStream()); lock (repositories) repositories.Add(nick, LRepo); }
static void OpenNetworkRepository(string[] commandParts) { string nick = commandParts [2]; string ip = commandParts [3]; string port = commandParts [4]; System.Net.Sockets.TcpClient TC = new System.Net.Sockets.TcpClient (); TC.Connect (new System.Net.IPEndPoint (System.Net.IPAddress.Parse (ip), int.Parse (port))); BD2.Chunk.ChunkRepository LRepo = new BD2.Repo.Net.Repository (TC.GetStream ()); lock (repositories) repositories.Add (nick, LRepo); }