This project is read-only.

Mono compatibility

Jan 30, 2009 at 1:07 PM

Did anyone successfully compile the webserver on Mono?

Using MonoDevelop 2.0 Alpha 2 with Mono Framework 2.2.5 on MacOS 10.5 here, and I get a couple of errors like this one at project compile time:

HttpInput.cs, Line=228, Column=63, Type=Error, Priority=Normal, Description=`System.Collections.Generic.IEnumerable<HttpServer.HttpInputItem>.GetEnumerator' in explicit interface declaration is not a member of interface(CS0539)
Jan 31, 2009 at 9:27 PM
Forget this one, please. It's the first time that I deal with Mono and I thought for some reason that I would need to compile it for Mono. But I don't need to. Compiled it with Visual C# 2008 (Express) against .NET 2.0, moved it over to a Linux-based server, and ran it with Mono 2.2 (compiled from scratch).

Works like a charm and lightning fast! (< 0.6ms / request)

The issue of TCP connections not being closed on time in order to process a huge amount of non-keepalive requests can be solved like this (Linux only):

echo 10 >/proc/sys/net/ipv4/tcp_fin_timeout 

That closes sockets, which are in the TIME_WAIT state within 10 seconds.

Feb 1, 2009 at 8:23 AM
Almund the other developer was working with compilation in mono. I'll ask him on monday if he solved the problem.

Are the sockets still not closing properly? (with the latest revision)
Feb 1, 2009 at 10:53 AM
No, they still don't close. :-(
Feb 9, 2009 at 7:53 PM
I did recieve the same error when I tried to compile in Mono but havent had the time to try and fix it. I think it could be averted by simply casting the inputitem to get a explicit enumerable in the foreach's. Kinda like

foreach(HttpInputItem item in (IEnumerable<HttpInputItem>)firstItem)