コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: vebin/BD2
 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);
 }