Mercurial Hosting > luan
diff src/luan/lib/rpc/RpcServer.java @ 1119:87c674f3f6b7
add RpcError
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 07 Aug 2017 12:35:45 -0600 |
parents | e4710ddfd287 |
children | e8fc6712b468 |
line wrap: on
line diff
--- a/src/luan/lib/rpc/RpcServer.java Sun Aug 06 20:11:11 2017 -0600 +++ b/src/luan/lib/rpc/RpcServer.java Mon Aug 07 12:35:45 2017 -0600 @@ -1,6 +1,5 @@ package luan.lib.rpc; -import java.io.IOException; import java.net.Socket; import java.util.List; import java.util.ArrayList; @@ -8,12 +7,14 @@ public class RpcServer extends RpcCon { - public RpcServer(Socket socket) throws IOException { + public RpcServer(Socket socket) + throws RpcError + { super(socket); } public RpcCall read() - throws IOException + throws RpcError { List list = readJson(); String cmd = (String)list.remove(0); @@ -22,7 +23,7 @@ } public void write(RpcResult result) - throws IOException + throws RpcError { List list = new ArrayList(); list.add(true); @@ -33,7 +34,7 @@ } public void write(RpcException ex) - throws IOException + throws RpcError { List list = new ArrayList(); list.add(false);