diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Form1.Designer.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Form1.Designer.cs
new file mode 100644
index 0000000..77cbaec
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Form1.Designer.cs
@@ -0,0 +1,163 @@
+namespace SpeedTestClient
+{
+ partial class Form1
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.button2 = new System.Windows.Forms.Button();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.richTextBox1 = new System.Windows.Forms.RichTextBox();
+ this.button1 = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox1.Location = new System.Drawing.Point(12, 50);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(181, 22);
+ this.textBox1.TabIndex = 1;
+ this.textBox1.Text = "localhost";
+ //
+ // button2
+ //
+ this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.button2.Location = new System.Drawing.Point(294, 50);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(103, 23);
+ this.button2.TabIndex = 2;
+ this.button2.Text = "Connect";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // textBox2
+ //
+ this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox2.Location = new System.Drawing.Point(199, 50);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
+ this.textBox2.Size = new System.Drawing.Size(89, 22);
+ this.textBox2.TabIndex = 3;
+ this.textBox2.Text = "14242";
+ //
+ // comboBox1
+ //
+ this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Items.AddRange(new object[] {
+ "Unreliable",
+ "UnreliableSequenced",
+ "ReliableUnordered",
+ "ReliableSequenced",
+ "ReliableOrdered"});
+ this.comboBox1.Location = new System.Drawing.Point(12, 12);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(282, 21);
+ this.comboBox1.TabIndex = 4;
+ //
+ // textBox3
+ //
+ this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox3.Location = new System.Drawing.Point(428, 12);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
+ this.textBox3.Size = new System.Drawing.Size(70, 22);
+ this.textBox3.TabIndex = 5;
+ this.textBox3.Text = "0";
+ //
+ // label1
+ //
+ this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(325, 15);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(101, 13);
+ this.label1.TabIndex = 6;
+ this.label1.Text = "Sequence channel";
+ //
+ // richTextBox1
+ //
+ this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.richTextBox1.Location = new System.Drawing.Point(12, 78);
+ this.richTextBox1.Name = "richTextBox1";
+ this.richTextBox1.Size = new System.Drawing.Size(487, 149);
+ this.richTextBox1.TabIndex = 7;
+ this.richTextBox1.Text = "";
+ //
+ // button1
+ //
+ this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.button1.Location = new System.Drawing.Point(403, 50);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(95, 23);
+ this.button1.TabIndex = 8;
+ this.button1.Text = "Settings";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(511, 239);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.richTextBox1);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.textBox3);
+ this.Controls.Add(this.comboBox1);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.textBox1);
+ this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label1;
+ public System.Windows.Forms.RichTextBox richTextBox1;
+ private System.Windows.Forms.Button button1;
+ }
+}
+
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Form1.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Form1.cs
new file mode 100644
index 0000000..49bdef7
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Form1.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace SpeedTestClient
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ comboBox1.SelectedIndex = 0;
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ int seqChan;
+ Int32.TryParse(textBox3.Text, out seqChan);
+ int port;
+ Int32.TryParse(textBox2.Text, out port);
+ Program.Connect(textBox1.Text, port, comboBox1.SelectedItem.ToString(), seqChan);
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ Program.DisplaySettings();
+ }
+ }
+}
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Form1.resx b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Form1.resx
new file mode 100644
index 0000000..ff31a6d
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Program.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Program.cs
new file mode 100644
index 0000000..bbb0785
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Program.cs
@@ -0,0 +1,184 @@
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using SamplesCommon;
+using Lidgren.Network;
+using System.Threading;
+
+namespace SpeedTestClient
+{
+ static class Program
+ {
+ private static NetClient s_client;
+ private static Form1 s_form;
+ private static NetPeerSettingsWindow s_settingsWindow;
+
+ private static NetDeliveryMethod s_method;
+ private static int s_sequenceChannel;
+
+ private static long s_sentBytes;
+ private static float s_lastUpdatedTitle;
+ private const float s_titleUpdateInterval = 0.75f;
+ private static long[] s_nextSendNumber = new long[256];
+
+ private const float s_sendInterval = 0.1f;
+
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ s_form = new Form1();
+
+ NetPeerConfiguration config = new NetPeerConfiguration("speedtest");
+ s_client = new NetClient(config);
+
+ Application.Idle += new EventHandler(Application_Idle);
+
+ Application.Run(s_form);
+ }
+
+ private static void Output(string text)
+ {
+ NativeMethods.AppendText(s_form.richTextBox1, text);
+ }
+
+ private static void Application_Idle(object sender, EventArgs e)
+ {
+ while (NativeMethods.AppStillIdle)
+ {
+ NetIncomingMessage im;
+ while ((im = s_client.ReadMessage()) != null)
+ {
+ // handle incoming message
+ switch (im.MessageType)
+ {
+ case NetIncomingMessageType.DebugMessage:
+ case NetIncomingMessageType.ErrorMessage:
+ case NetIncomingMessageType.WarningMessage:
+ case NetIncomingMessageType.VerboseDebugMessage:
+ string text = im.ReadString();
+ Output(text);
+ break;
+ case NetIncomingMessageType.StatusChanged:
+ NetConnectionStatus status = (NetConnectionStatus)im.ReadByte();
+ string reason = im.ReadString();
+ Output(status.ToString() + ": " + reason);
+ s_form.Text = "Speed test client: " + status.ToString();
+ break;
+ case NetIncomingMessageType.Data:
+ //string chat = im.ReadString();
+ //Output(chat);
+ break;
+ default:
+ Output("Unhandled type: " + im.MessageType);
+ break;
+ }
+ }
+
+ float now = (float)NetTime.Now;
+ if (now > s_lastUpdatedTitle + s_titleUpdateInterval)
+ {
+ s_form.Text = "Speed test client: " + (s_client.ServerConnection != null ? s_client.ServerConnection.Status.ToString() : "(no connection)") + " " + NetUtility.ToHumanReadable(s_sentBytes) + " bytes sent";
+ s_lastUpdatedTitle = now;
+ }
+
+ if (s_client.ServerConnection != null && s_client.ServerConnection.Status == NetConnectionStatus.Connected)
+ {
+ //
+ // Saturate the line
+ //
+ int windowSize, freeWindowSlots;
+ s_client.ServerConnection.GetSendQueueInfo(s_method, s_sequenceChannel, out windowSize, out freeWindowSlots);
+
+ // queue up to double window size
+ if (windowSize == 0)
+ freeWindowSlots = 1;
+
+ int num = 0;
+ while(freeWindowSlots > -windowSize)
+ {
+ // send random data
+ int size = s_client.Configuration.MaximumTransmissionUnit - 30;
+ NetOutgoingMessage om = s_client.CreateMessage(size);
+ byte[] tmp = new byte[size];
+ NetRandom.Instance.NextBytes(tmp);
+ int slot = (int)s_method + s_sequenceChannel;
+ om.Write(s_nextSendNumber[slot]);
+ s_nextSendNumber[slot]++;
+ om.Write(tmp);
+
+ // queue message for sending
+ NetSendResult res = s_client.SendMessage(om, s_method, s_sequenceChannel);
+ if (s_method != NetDeliveryMethod.Unreliable && s_method != NetDeliveryMethod.UnreliableSequenced)
+ {
+ if (res != NetSendResult.Queued && res != NetSendResult.Sent)
+ throw new NetException("Got res " + res);
+ }
+ s_sentBytes += size;
+
+ freeWindowSlots--;
+ num++;
+ }
+ //Console.WriteLine("Queued " + num + " messages");
+
+ //
+ // Send every X millisecond
+ //
+ /*
+ if (now > s_lastSend + s_sendInterval)
+ {
+
+ // send random data
+ int size = s_client.Configuration.MaximumTransmissionUnit - 25;
+ NetOutgoingMessage om = s_client.CreateMessage(size);
+ byte[] tmp = new byte[size];
+ NetRandom.Instance.NextBytes(tmp);
+ int slot = (int)s_method + s_sequenceChannel;
+ om.Write(s_nextSendNumber[slot]);
+ s_nextSendNumber[slot]++;
+ om.Write(tmp);
+
+ // queue message for sending
+ NetSendResult res = s_client.SendMessage(om, s_method, s_sequenceChannel);
+ if (res != NetSendResult.Queued && res != NetSendResult.Sent)
+ throw new NetException("Got res " + res);
+ //Console.WriteLine("Res: " + res);
+ s_sentBytes += size;
+
+ s_lastSend = now;
+ }
+ */
+ }
+
+ Thread.Sleep(0);
+ }
+ }
+
+ // called by the UI
+ internal static void Connect(string host, int port, string deliveryMethod, int sequenceChannel)
+ {
+ s_client.Start();
+
+ s_method = (NetDeliveryMethod)Enum.Parse(typeof(NetDeliveryMethod), deliveryMethod);
+ s_sequenceChannel = sequenceChannel;
+
+ s_client.Connect(host, port);
+ }
+
+ // called by the UI
+ public static void DisplaySettings()
+ {
+ if (s_settingsWindow != null && s_settingsWindow.Visible)
+ {
+ s_settingsWindow.Hide();
+ }
+ else
+ {
+ if (s_settingsWindow == null || s_settingsWindow.IsDisposed)
+ s_settingsWindow = new NetPeerSettingsWindow("Speed test client settings", s_client);
+ s_settingsWindow.Show();
+ }
+ }
+ }
+}
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/AssemblyInfo.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8fbb7db
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SpeedTestClient")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("SpeedTestClient")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("d19a0d9e-10ed-4442-b0d6-0ede7488dad6")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Resources.Designer.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..b9aa81c
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.4952
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace SpeedTestClient.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SpeedTestClient.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Resources.resx b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Resources.resx
new file mode 100644
index 0000000..ffecec8
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Settings.Designer.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..5e3cbe8
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.4952
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace SpeedTestClient.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Settings.settings b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Settings.settings
new file mode 100644
index 0000000..abf36c5
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedClient/SpeedTestClient.csproj b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/SpeedTestClient.csproj
new file mode 100644
index 0000000..5adf25d
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedClient/SpeedTestClient.csproj
@@ -0,0 +1,98 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.21022
+ 2.0
+ {838DA9DF-D162-4CD7-A427-3399BD76FF1F}
+ WinExe
+ Properties
+ SpeedTestClient
+ SpeedTestClient
+ v3.5
+ 512
+
+
+
+
+
+
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+ 3.5
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+ Form1.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+ {AE483C29-042E-4226-BA52-D247CE7676DA}
+ Lidgren.Network
+
+
+ {773069DA-B66E-4667-ADCB-0D215AD8CF3E}
+ SamplesCommon
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedSample.sln b/Samples/LibraryTestSamples/SpeedSample/SpeedSample.sln
new file mode 100644
index 0000000..050f725
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedSample.sln
@@ -0,0 +1,38 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeedTestClient", "SpeedClient\SpeedTestClient.csproj", "{838DA9DF-D162-4CD7-A427-3399BD76FF1F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeedTestServer", "SpeedServer\SpeedTestServer.csproj", "{A994C246-8EEC-452D-ACA6-554463B2892B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamplesCommon", "..\..\SamplesCommon\SamplesCommon.csproj", "{773069DA-B66E-4667-ADCB-0D215AD8CF3E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network", "..\..\..\Lidgren.Network\Lidgren.Network.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {838DA9DF-D162-4CD7-A427-3399BD76FF1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {838DA9DF-D162-4CD7-A427-3399BD76FF1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {838DA9DF-D162-4CD7-A427-3399BD76FF1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {838DA9DF-D162-4CD7-A427-3399BD76FF1F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A994C246-8EEC-452D-ACA6-554463B2892B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A994C246-8EEC-452D-ACA6-554463B2892B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A994C246-8EEC-452D-ACA6-554463B2892B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A994C246-8EEC-452D-ACA6-554463B2892B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {773069DA-B66E-4667-ADCB-0D215AD8CF3E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Form1.Designer.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Form1.Designer.cs
new file mode 100644
index 0000000..c128f99
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Form1.Designer.cs
@@ -0,0 +1,103 @@
+namespace SpeedTestServer
+{
+ partial class Form1
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.button1 = new System.Windows.Forms.Button();
+ this.richTextBox1 = new System.Windows.Forms.RichTextBox();
+ this.button2 = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 9);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(38, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "label1";
+ //
+ // button1
+ //
+ this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.button1.Location = new System.Drawing.Point(478, 41);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "Settings";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // richTextBox1
+ //
+ this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.richTextBox1.Location = new System.Drawing.Point(15, 303);
+ this.richTextBox1.Name = "richTextBox1";
+ this.richTextBox1.Size = new System.Drawing.Size(538, 148);
+ this.richTextBox1.TabIndex = 2;
+ this.richTextBox1.Text = "";
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(478, 12);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(75, 23);
+ this.button2.TabIndex = 3;
+ this.button2.Text = "Start";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(565, 463);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.richTextBox1);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.label1);
+ this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ public System.Windows.Forms.RichTextBox richTextBox1;
+ public System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button button2;
+ }
+}
+
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Form1.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Form1.cs
new file mode 100644
index 0000000..9814295
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Form1.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace SpeedTestServer
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ Program.DisplaySettings();
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ if (button2.Text == "Start")
+ {
+ Program.Start();
+ button2.Text = "Shutdown";
+ }
+ else
+ {
+ Program.Shutdown();
+ button2.Text = "Start";
+ }
+ }
+ }
+}
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Form1.resx b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Form1.resx
new file mode 100644
index 0000000..ff31a6d
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Program.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Program.cs
new file mode 100644
index 0000000..a81fd3b
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Program.cs
@@ -0,0 +1,164 @@
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using Lidgren.Network;
+using SamplesCommon;
+using System.Threading;
+using System.Text;
+
+namespace SpeedTestServer
+{
+ static class Program
+ {
+ private static Form1 s_form;
+ private static NetServer s_server;
+ private static NetPeerSettingsWindow s_settingsWindow;
+
+ private const double s_labelUpdateInterval = 0.5f;
+ private static double s_lastLabelUpdate;
+
+ private static long s_totalBytesReceived;
+ private static long s_bpsBytes;
+ private static long[] s_nextNumber = new long[256];
+
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ s_form = new Form1();
+
+ // set up network
+ NetPeerConfiguration config = new NetPeerConfiguration("speedtest");
+ config.MaximumConnections = 1;
+ config.Port = 14242;
+ s_server = new NetServer(config);
+
+ Application.Idle += new EventHandler(Application_Idle);
+ Application.Run(s_form);
+ }
+
+ private static void Output(string text)
+ {
+ NativeMethods.AppendText(s_form.richTextBox1, text);
+ }
+
+ private static void Application_Idle(object sender, EventArgs e)
+ {
+ while (NativeMethods.AppStillIdle)
+ {
+ NetIncomingMessage im;
+ while ((im = s_server.ReadMessage()) != null)
+ {
+ // handle incoming message
+ switch (im.MessageType)
+ {
+ case NetIncomingMessageType.DebugMessage:
+ case NetIncomingMessageType.ErrorMessage:
+ case NetIncomingMessageType.WarningMessage:
+ case NetIncomingMessageType.VerboseDebugMessage:
+ string text = im.ReadString();
+ Output(text);
+ break;
+ case NetIncomingMessageType.StatusChanged:
+ NetConnectionStatus status = (NetConnectionStatus)im.ReadByte();
+ string reason = im.ReadString();
+ Output(NetUtility.ToHexString(im.SenderConnection.RemoteUniqueIdentifier) + " " + status + ": " + reason);
+ break;
+ case NetIncomingMessageType.Data:
+
+ long nr = im.ReadInt64();
+ int slot = (int)im.DeliveryMethod + im.SequenceChannel;
+ long expected = s_nextNumber[slot];
+ switch (im.DeliveryMethod)
+ {
+ case NetDeliveryMethod.Unreliable:
+ // anything is FINE
+ break;
+ case NetDeliveryMethod.UnreliableSequenced:
+ case NetDeliveryMethod.ReliableSequenced:
+ if (expected < nr)
+ throw new NetException(im.DeliveryMethod.ToString() + " failed! Expected " + expected + " received " + nr);
+ s_nextNumber[slot] = nr + 1;
+ break;
+ case NetDeliveryMethod.ReliableUnordered:
+ // anything is fine, basically
+ break;
+ case NetDeliveryMethod.ReliableOrdered:
+ if (expected != nr)
+ throw new NetException(im.DeliveryMethod.ToString() + " failed! Expected " + expected + " received " + nr);
+ s_nextNumber[slot] = nr + 1;
+ break;
+ }
+
+ int len = im.LengthBytes;
+ s_totalBytesReceived += len;
+ s_bpsBytes += len;
+ break;
+ default:
+ Output("Unhandled type: " + im.MessageType);
+ break;
+ }
+ s_server.Recycle(im);
+ }
+
+ double now = NetTime.Now;
+ if (now > s_lastLabelUpdate + s_labelUpdateInterval)
+ {
+ //
+ // Update label
+ //
+
+ StringBuilder bdr = new StringBuilder();
+ bdr.Append(s_server.Statistics.ToString());
+
+ List conns = s_server.Connections;
+ if (conns.Count > 0)
+ bdr.Append(conns[0].Statistics.ToString());
+
+ bdr.AppendLine("Total bytes received: " + NetUtility.ToHumanReadable(s_totalBytesReceived));
+
+ // calculate bytes per second
+ double time = now - s_lastLabelUpdate;
+ double bps = (double)s_bpsBytes / time;
+ s_bpsBytes = 0;
+
+ bdr.AppendLine("Bytes/second: " + NetUtility.ToHumanReadable((long)bps));
+
+ s_form.label1.Text = bdr.ToString();
+
+ s_lastLabelUpdate = now;
+ }
+
+ Thread.Sleep(0);
+ }
+ }
+
+ // called by the UI
+ public static void Start()
+ {
+ s_server.Start();
+ }
+
+ // called by the UI
+ public static void Shutdown()
+ {
+ s_server.Shutdown("Requested by user");
+ }
+
+ // called by the UI
+ public static void DisplaySettings()
+ {
+ if (s_settingsWindow != null && s_settingsWindow.Visible)
+ {
+ s_settingsWindow.Hide();
+ }
+ else
+ {
+ if (s_settingsWindow == null || s_settingsWindow.IsDisposed)
+ s_settingsWindow = new NetPeerSettingsWindow("Speed test server settings", s_server);
+ s_settingsWindow.Show();
+ }
+ }
+ }
+}
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/AssemblyInfo.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..9cd381d
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SpeedTestServer")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("SpeedTestServer")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("75b4c4ad-05cc-4dbf-852f-cd28fe1f3864")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Resources.Designer.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..8b2e5ce
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.4952
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace SpeedTestServer.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SpeedTestServer.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Resources.resx b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Resources.resx
new file mode 100644
index 0000000..ffecec8
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Settings.Designer.cs b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..bae77c1
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.4952
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace SpeedTestServer.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Settings.settings b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Settings.settings
new file mode 100644
index 0000000..abf36c5
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Samples/LibraryTestSamples/SpeedSample/SpeedServer/SpeedTestServer.csproj b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/SpeedTestServer.csproj
new file mode 100644
index 0000000..42f6357
--- /dev/null
+++ b/Samples/LibraryTestSamples/SpeedSample/SpeedServer/SpeedTestServer.csproj
@@ -0,0 +1,99 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.21022
+ 2.0
+ {A994C246-8EEC-452D-ACA6-554463B2892B}
+ WinExe
+ Properties
+ SpeedTestServer
+ SpeedTestServer
+ v3.5
+ 512
+
+
+
+
+
+
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+ 3.5
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+ Form1.cs
+ Designer
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+ {AE483C29-042E-4226-BA52-D247CE7676DA}
+ Lidgren.Network
+
+
+ {773069DA-B66E-4667-ADCB-0D215AD8CF3E}
+ SamplesCommon
+
+
+
+
+
\ No newline at end of file