agsXMPP 1.1 released

We released version 1.1 of our agsXMPP SDK.

During the Secure Communication Week we tested with several customers the TLS encryption for the Compact Framework which is now included in this new release.

Download the new release here.

Security matters

The first Secure Communications Week is coming soon: October 4-11, 2008.

agsXMPP still doesn’t support SSL and TLS when targeting the .NET Compact Framework, because there is still no SslStream available.

Our contribution to the Secure Communications Week will be to implement TLS support for agsXMPP on CF before the Secure Communications Week starts on October 4. Stay tuned for more follow-up.

agsXMPP and Silverlight

agsXMPP supports lots of platforms which currently include Windows, Linux (Mono) and Windows-Mobile. And the next version I am currently working on will also support Microsoft Silverlight.
This opens new possibilities to xmpp web development.

I attached a small screenshot which shows agsXMPP for Silverlight in action. Follow this blog for updates.

agsXMPP Silverlight example

SRV meets LINQ

LINQ (Language Integrated Query) is really amazing.

Today I rewrote a function which picks the correct SRV-Record according to the priority and weight for XMPP client and server connections. The old code without comments were 63 lines. The new code is about 12 lines and much easier to read IMHO.

But take a look at the code yourself.

private SRVRecord PickSRVRecord(List<Srvrecord> srv)
{
	IEnumerable<Srvrecord> minServers
		= srv.Where(s1 = t; s1.Priority == srv.Min(s => s.Priority));

	if (minServers.Count() > 1)
	{
		int sumWeight = minServers.Sum(s = s.Weight);

		// Create a random value between 1 - total Weight
		int rnd = new Random().Next(1, sumWeight);

		int count = 0;
		SRVRecord result = minServers.First(
		s => rnd > ((count += s.Weight) - s.Weight) && rnd <= count);

		return result;
	}
	else
		return  minServers.First();
}