Skip to content

Commit

Permalink
v1.1.21
Browse files Browse the repository at this point in the history
+ improved stability
+ improved performance
+ optimized latency
  • Loading branch information
Meoqan committed May 16, 2017
1 parent 06fb2db commit 9902f49
Show file tree
Hide file tree
Showing 87 changed files with 3,424 additions and 22,661 deletions.
58 changes: 58 additions & 0 deletions Vaser/ATestClient_Disco/ATestClient_Disco.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7E90BF2F-A95A-4BDF-8A17-E59DBA2A8E5C}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ATestClient_Disco</RootNamespace>
<AssemblyName>ATestClient_Disco</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Vaser\Vaser.csproj">
<Project>{18fbb9b5-1bff-411e-abcd-b08aafee2d0c}</Project>
<Name>Vaser</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
6 changes: 6 additions & 0 deletions Vaser/ATestClient_Disco/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
126 changes: 126 additions & 0 deletions Vaser/ATestClient_Disco/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Vaser;
using System.Threading;

namespace ATestClient_Disco
{
class Program
{


// Build your data container
public class TestContainer : Container
{
//only public, nonstatic and standard datatypes can be transmitted
public int ID = 1;
public string test = "test text!";

//also 1D arrays are posible
//public int[] array = new int[10000];
}


static object Livinglist_lock = new object();
static List<Link> Livinglist = new List<Link>();



static void Main(string[] args)
{
ThreadPool.QueueUserWorkItem(Threads);


Console.ReadKey();
//}
}

static void Threads(object Context)
{

//Client initalisieren
Portal system = new Portal(100);
PortalCollection PC = new PortalCollection();
PC.RegisterPortal(system);

system.IncomingPacket += OnSystemPacket;


Thread.Sleep(1000);

//while (online)
//{
int counter = 0;

lock (Livinglist_lock)
{
counter++;
Vaser.ConnectionSettings.VaserKerberosClient k = new Vaser.ConnectionSettings.VaserKerberosClient();
Link lnk1 = VaserClient.ConnectClient("wswinprev", 3500, PC, k);
lnk1.Disconnecting += OnDisconnectingLink;
lnk1.AttachedID = (uint)counter;


if (lnk1 != null)
{
Console.WriteLine("1: successfully established connection.");

Livinglist.Add(lnk1);
}
}

Thread.CurrentThread.Abort();
}

static void OnDisconnectingLink(object p, LinkEventArgs e)
{
Console.Write("CL OnDisconnectingLink: " + e.lnk.AttachedID);
lock (Livinglist_lock)
{
Livinglist.Remove(e.lnk);
//Console.WriteLine(" Okay "+ Livinglist.Count);
}
}

static uint counter = 0;
static TestContainer con2 = new TestContainer();
static void OnSystemPacket(object p, PacketEventArgs e)
{
switch (e.pak.ContainerID)
{
case 1:

// [1] now you can sort the packet to the right container and object
//Console.WriteLine("the packet has the container ID {0} and is for the object ID {1} ", pak.ContainerID, pak.ObjectID);

//unpack the packet, true if the decode was successful
if (con2.UnpackContainer(e.pak))
{
if (con2.ID < 0) Console.WriteLine("Decode error: " + con2.ID);
//if (con2.ID > 100) Console.WriteLine("Decode error: " + con2.ID);
if (con2.ID < 10)
{
Console.WriteLine("Ping! " + counter + " CounterID" + con2.ID + " Object:" + e.pak.ObjectID);

con2.ID += 1;
e.portal.SendContainer(e.pak.link, con2, 1, e.pak.ObjectID);
}
else
{
counter++;
//Console.WriteLine("Disconnecting! " + counter + " CounterID" + con2.ID + " Object:" + e.pak.ObjectID);
//e.pak.link.Dispose();
}
}
else
{
Console.WriteLine("Decode error");
}
break;
}
}
}
}
36 changes: 36 additions & 0 deletions Vaser/ATestClient_Disco/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("ATestClient_Disco")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ATestClient_Disco")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]

// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("7e90bf2f-a95a-4bdf-8a17-e59dba2a8e5c")]

// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
58 changes: 58 additions & 0 deletions Vaser/ATestServer_Disco/ATestServer_Disco.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AF0777DC-E104-49C8-B0DA-04EBD026C6D6}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ATestServer_Disco</RootNamespace>
<AssemblyName>ATestServer_Disco</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Vaser\Vaser.csproj">
<Project>{18fbb9b5-1bff-411e-abcd-b08aafee2d0c}</Project>
<Name>Vaser</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
6 changes: 6 additions & 0 deletions Vaser/ATestServer_Disco/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
Loading

0 comments on commit 9902f49

Please sign in to comment.