Mercurial > projects > ldc
comparison tango/example/cluster/tserver.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.TaskServer; | |
11 | |
12 import Add; | |
13 | |
14 /******************************************************************************* | |
15 | |
16 *******************************************************************************/ | |
17 | |
18 void main (char[][] args) | |
19 { | |
20 auto arg = new CmdParser ("task.server"); | |
21 | |
22 if (args.length > 1) | |
23 arg.parse (args[1..$]); | |
24 | |
25 if (arg.help) | |
26 Cout ("usage: taskserver -port=number -log[=trace, info, warn, error, fatal, none]").newline; | |
27 else | |
28 { | |
29 auto server = new TaskServer (new InternetAddress(arg.port), arg.log); | |
30 server.enroll (new NetCall!(add)); | |
31 server.enroll (new Subtract); | |
32 server.start; | |
33 } | |
34 } |