diff --git a/DtronixMessageQueue.Tests.Performance/DtronixMessageQueue.Tests.Performance.csproj b/DtronixMessageQueue.Tests.Performance/DtronixMessageQueue.Tests.Performance.csproj
index fff9174..7cea79d 100644
--- a/DtronixMessageQueue.Tests.Performance/DtronixMessageQueue.Tests.Performance.csproj
+++ b/DtronixMessageQueue.Tests.Performance/DtronixMessageQueue.Tests.Performance.csproj
@@ -50,6 +50,7 @@
+
diff --git a/DtronixMessageQueue.Tests.Performance/Program.cs b/DtronixMessageQueue.Tests.Performance/Program.cs
index 149e462..d49d0e4 100644
--- a/DtronixMessageQueue.Tests.Performance/Program.cs
+++ b/DtronixMessageQueue.Tests.Performance/Program.cs
@@ -83,7 +83,7 @@ private static void WriteSysInfo() {
}
private static void StartClient(int total_loops, int total_messages, int total_frames, int frame_size) {
- var cl = new MqClient(new MqSocketConfig() {
+ var cl = new MqClient(new MqSocketConfig() {
Ip = "127.0.0.1",
Port = 2828
});
@@ -150,7 +150,7 @@ private static void StartClient(int total_loops, int total_messages, int total_f
}
private static void StartServer(int total_messages, int total_clients) {
- var server = new MqServer(new MqSocketConfig() {
+ var server = new MqServer(new MqSocketConfig() {
Ip = "127.0.0.1",
Port = 2828
});
@@ -163,7 +163,7 @@ private static void StartServer(int total_messages, int total_clients) {
builder.Write("START");
var start_message = builder.ToMessage(true);
- ConcurrentDictionary clients_info = new ConcurrentDictionary();
+ ConcurrentDictionary clients_info = new ConcurrentDictionary();
server.Connected += (sender, session) => {
@@ -206,7 +206,7 @@ private static void StartServer(int total_messages, int total_clients) {
private class ClientRunInfo {
public int Runs { get; set; }
- public MqSession Session { get; set; }
+ public SimpleMqSession Session { get; set; }
}
@@ -270,7 +270,7 @@ static void InProcessTest() {
}
private static void MqInProcessPerformanceTests(int runs, int loops, MqMessage message, MqSocketConfig config) {
- var server = new MqServer(config);
+ var server = new MqServer(config);
server.Start();
double[] total_values = { 0, 0, 0 };
@@ -280,7 +280,7 @@ private static void MqInProcessPerformanceTests(int runs, int loops, MqMessage m
var wait = new AutoResetEvent(false);
var complete_test = new AutoResetEvent(false);
- var client = new MqClient(config);
+ var client = new MqClient(config);
Console.WriteLine("| Build | Messages | Msg Bytes | Milliseconds | MPS | MBps |");
Console.WriteLine("|---------|------------|-----------|--------------|------------|----------|");
diff --git a/DtronixMessageQueue.Tests.Performance/SimpleMqSession.cs b/DtronixMessageQueue.Tests.Performance/SimpleMqSession.cs
new file mode 100644
index 0000000..ed862c5
--- /dev/null
+++ b/DtronixMessageQueue.Tests.Performance/SimpleMqSession.cs
@@ -0,0 +1,4 @@
+namespace DtronixMessageQueue.Tests.Performance {
+ public class SimpleMqSession : MqSession {
+ }
+}
diff --git a/DtronixMessageQueue/IncomingMessageEventArgs.cs b/DtronixMessageQueue/IncomingMessageEventArgs.cs
index 31efa3a..40de487 100644
--- a/DtronixMessageQueue/IncomingMessageEventArgs.cs
+++ b/DtronixMessageQueue/IncomingMessageEventArgs.cs
@@ -17,14 +17,14 @@ public class IncomingMessageEventArgs : EventArgs
///
/// If this message is on the server, this will contain the reference to the connected session of the client.
///
- public MqSession Session { get; }
+ public TSession Session { get; }
///
/// Creates an instance of the event args.
///
/// Messages read and ready to be used.
/// Server session. Null if this is on the client.
- public IncomingMessageEventArgs(Queue messages, MqSession session) {
+ public IncomingMessageEventArgs(Queue messages, TSession session) {
Messages = messages;
Session = session;
}
diff --git a/DtronixMessageQueue/MqSession.cs b/DtronixMessageQueue/MqSession.cs
index 9d7e440..86ef7bc 100644
--- a/DtronixMessageQueue/MqSession.cs
+++ b/DtronixMessageQueue/MqSession.cs
@@ -196,7 +196,7 @@ internal void ProcessIncomingQueue() {
//Postmaster.SignalReadComplete(this);
if (messages != null) {
- OnIncomingMessage(this, new IncomingMessageEventArgs(messages, this));
+ OnIncomingMessage(this, new IncomingMessageEventArgs(messages, (TSession)this));
}
}