Hey Guys!
I'm developing some cool new libraries for .NET framework, especially for C#.
Maybe some of you also use the great AcknexWrapper from Matthias Auer, so i thought i ask if someone need some special library for GS development.
I'm writing on my own C# framework with cool stuff like easy networking a la WCF and also on multitouch stuff.
A simple sample of my networking library:
serverside code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Queissner.Framework.QNet;
namespace TestServer
{
public class Server
{
[QNetMethod]
public void WriteLine(string line)
{
Console.WriteLine(line);
}
[QNetMethod(UseThread=true)]
public int Add5(int i)
{
Console.WriteLine("Adding 5 to " + i + " = " + (i + 5));
return i + 5;
}
[QNetMethod]
public int Divide(int a, int b)
{
Console.WriteLine("Divide " + a + " / " + b);
return a / b;
}
static void Main(string[] args)
{
Server srv = new Server();
QNetServer<Server> server = new QNetServer<Server>(1234, srv);
server.CallThreadSafe = true;
server.ClientConnected += new ConnectionDelegate(server_ClientConnected);
server.Start(2);
while (server.Connected)
{
server.DoEvents();
Thread.Sleep(10);
}
}
static void server_ClientConnected(object sender)
{
Console.WriteLine("Client connected!");
}
}
}
clientside code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Queissner.Framework.QNet;
namespace TestClient
{
public class Client
{
[QNetMethod]
public void Add5Callback(int iResult)
{
Console.WriteLine("Add5 returned " + iResult);
}
[QNetMethod]
public void DivideCallback(int iResult)
{
Console.WriteLine("Divide returned " + iResult);
}
static void Main(string[] args)
{
Client client = new Client();
QNetClient<Client> qnet = new QNetClient<Client>(client);
qnet.CallThreadSafe = false;
qnet.ExceptionThrown += new ExceptionThrownDelegate(qnet_ExceptionThrown);
qnet.Start("localhost", 1234);
qnet.WaitForConnection();
Console.WriteLine("WriteLine(\"Hello World!\");");
qnet.Invoke("WriteLine", "Hello World!");
Thread.Sleep(250);
Console.WriteLine("Add5(37);");
qnet.Invoke("Add5", 37);
Console.WriteLine("Divide(5,0);");
qnet.Invoke("Divide", 5, 0);
Console.ReadLine();
qnet.Stop();
}
static void qnet_ExceptionThrown(object sender, Exception exception)
{
Console.WriteLine(exception);
}
}
}
As you can see you can call any function with any parameter as far as the parameter is marked as "Serializable".
Planned features of QNet:
- Compression
- Securing network data
- Async and Sync method calls (non-blocking / blocking)
- Sending of "raw" data
I'm starting now with the multitouch library. Planned features of QTouch are:
- Extension of default System.Windows.Form with multitouch events
- Custom event listener on any other form (eg. the Gamestudio Window)
- Gestures
- Tracking of touch points
Other libraries i have mind:
- Simple database access without knowing the database structure (Simply read and write classes into the database)
- UDP stuff (image transfer, server/client, ...)
If you want to test a library of my little framework, you can send me pm.
Then i'm sending you a demo version of the framework.
Please give me some feedback, your opinion and maybe some other stuff you want to see in such a framework.
Greetz Felix Queißner