Mercurial > projects > ldc
comparison tango/example/cluster/cserver.d @ 132:1700239cab2e trunk
[svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.
Lots of bugfixes...
This build is not suitable for most things.
author | lindquist |
---|---|
date | Fri, 11 Jan 2008 17:57:40 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:5825d48b27d1 | 132:1700239cab2e |
---|---|
1 /******************************************************************************* | |
2 | |
3 *******************************************************************************/ | |
4 | |
5 import tango.io.Console; | |
6 | |
7 import tango.net.InternetAddress; | |
8 | |
9 import tango.net.cluster.tina.CmdParser, | |
10 tango.net.cluster.tina.CacheServer; | |
11 | |
12 /******************************************************************************* | |
13 | |
14 *******************************************************************************/ | |
15 | |
16 void main (char[][] args) | |
17 { | |
18 auto arg = new CmdParser ("cache.server"); | |
19 | |
20 // default number of cache entries | |
21 arg.size = 8192; | |
22 | |
23 if (args.length > 1) | |
24 arg.parse (args[1..$]); | |
25 | |
26 if (arg.help) | |
27 Cout ("usage: cacheserver -port=number -size=cachesize -log[=trace, info, warn, error, fatal, none]").newline; | |
28 else | |
29 (new CacheServer(new InternetAddress(arg.port), arg.log, arg.size)).start; | |
30 } |