Initial project commit
This commit is contained in:
43
CircuitLoadTest/Program.cs
Normal file
43
CircuitLoadTest/Program.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
|
||||
namespace CircuitLoadTest
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
/*
|
||||
String file = System.IO.File.ReadAllText("C:\\Projects\\Fun\\Tor\\Hermes\\bin\\Debug\\circ.debug.csv");
|
||||
StringReader reader = new StringReader(file);
|
||||
using (SqlConnection conn = new SqlConnection("Data Source=MAIN;Initial Catalog=Test;User Id=sa;Password=Sm0kers@Gy0;"))
|
||||
{
|
||||
conn.Open();
|
||||
while (true)
|
||||
{
|
||||
String line = reader.ReadLine();
|
||||
if (String.IsNullOrEmpty(line))
|
||||
break;
|
||||
String[] parts = line.Split(',');
|
||||
String sqlRequest = String.Format(@"MERGE dbo.TorTest AS target
|
||||
USING (SELECT {0}, '{1}') AS source (CircuitID, [Status])
|
||||
ON (target.CircuitID = source.CircuitID)
|
||||
WHEN MATCHED AND ([Status] = 'CLOSED' OR [Status] = 'FAILED') THEN
|
||||
UPDATE SET Closed = 1
|
||||
WHEN NOT MATCHED AND ([Status] = 'BUILT') THEN
|
||||
INSERT (CircuitID, Closed)
|
||||
VALUES (source.CircuitID, 0);", parts[0], parts[1]);
|
||||
new SqlCommand(sqlRequest, conn).ExecuteNonQuery();
|
||||
}
|
||||
}*/
|
||||
//Socket s = new Socket(AddressFamily.InterNetworkV6, SocketType.Dgram, ProtocolType.Udp);
|
||||
//s.Bind(new System.Net.IPEndPoint(System.Net.IPAddress.IPv6Any, 1234));
|
||||
////s.Listen(10);
|
||||
//Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user