Test1 includes several console applications exchanging messages.
You can download the source, exe, dll and config files from http://sourceforge.net/projects/asyncwcflib
Test1 is intended to show the easyest way to use AsynWcfLib.
The solution contains 7 projects, each creating an assembly (see [AsyncWcfLib package diagram]):
The created assemblies are located in folder "Test1/bin/net45vs11", "Test1/bin/vs2010" or "Test1/bin/mono".
You must have installed Microsoft .NET Framework 4.5 in order to run Test1.net45.cmd.
When using VisualStudio 2010 and .NET Framework 4.0 you should run Test1.vs2010.cmd.
On Linux you should run the shell script Test1.cmd.sh.
All of these scripts will start a bunch of applications each sending a command when entered at the console.
For a start you may manually run just Test1.Client.exe and Test1.Service.exe.
Enter commands on client side.
See messages received on service side.
See that all messages are received by the same thread as Send() was called from.
This is through the help of Nito.Async.dll, a tiny assembly included in the binarys, see [Threadsafety and SynchronizationContext].
Start a second client.
By default, ApplicationInstance=0 is set. This starts the client in "temporary host session mode",
see [Service- and client identification].
The operating system process id is used to identify the two clients on service side.
Start a third client, using the command line "Test1.Client.exe 3".
This sets an ApplicationInstance=3 for this client. It is started in "permanent host session mode".
The different session modes may be run at the same time.
Have a look at the other projects.
Analyse source code, using help from
What Test1 does not:
For better understanding, all projects of Test1 share one folder.
This results in an untypical sharing of files App.config and AssemblyInfo.cs.
Most projects of Test1 do not use the WcfRouter. Only ServiceActive uses it.
Hostname and TCP portnumber of the service is on the commandline.
Wiki: AsyncWcfLib class diagram messages
Wiki: AsyncWcfLib package diagram
Wiki: Home
Wiki: Implement a client using AsyncWcfLib
Wiki: Implement a service using AsyncWcfLib
Wiki: Implement messages using AsyncWcfLib
Wiki: Service- and client identification
Wiki: Threadsafety and SynchronizationContext