Created
May 3, 2010 13:29
-
-
Save kzk/388088 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.msgpack.rpc; | |
import java.io.IOException; | |
import org.msgpack.rpc.client.Client; | |
import org.msgpack.rpc.server.*; | |
/** | |
* Hello world! | |
* | |
*/ | |
public class App | |
{ | |
public int hello0() { | |
System.out.println("hello0"); | |
return 0; | |
} | |
public int hello1(int a) { | |
System.out.println("hello1"); | |
return 1; | |
} | |
public int hello2(int a, int b) { | |
System.out.println("hello2"); | |
return 2; | |
} | |
public static void main( String[] args ) | |
{ | |
Server s = new Server(); | |
try { | |
System.out.println("listen!"); | |
s.listen(1985, new App()); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment