Mercurial > hg > Members > nobuyasu > TestJava
comparison src/msgpack/test/TestMsgPackServer.java @ 0:d86770305c8b draft
add TestJava
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 11 May 2012 02:30:59 +0900 |
parents | |
children | 830afc6475b0 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d86770305c8b |
---|---|
1 package msgpack.test; | |
2 | |
3 import org.msgpack.rpc.Server; | |
4 import org.msgpack.rpc.loop.EventLoop; | |
5 | |
6 public class TestMsgPackServer { | |
7 public String hello(String msg, int a) { | |
8 return msg; | |
9 } | |
10 | |
11 public static void main(String[] args) throws Exception { | |
12 EventLoop loop = EventLoop.defaultEventLoop(); | |
13 | |
14 Server svr = new Server(); | |
15 svr.serve(new TestMsgPackServer()); | |
16 svr.listen(8888); | |
17 | |
18 loop.join(); | |
19 } | |
20 } |