public void receiveRequest(byte[] bytes, Transport transport) throws IOException, WsonrpcException {
        JsonRpcResponse resp;
        try {
            JsonRpcMessage msg = receive(bytes);
            if (msg instanceof JsonRpcRequest) {
                JsonRpcRequest req = (JsonRpcRequest) msg;
                resp = execute(req);
            } else {
                resp = new JsonRpcResponse(null, JsonRpcError.invalidRequestError(null));
            }
        } catch (JsonException e) {
            resp = new JsonRpcResponse(null, JsonRpcError.parseError(e));
        } catch (IOException e) {
            resp = new JsonRpcResponse(null, JsonRpcError.internalError(e));
        }
        transmit(transport, resp);
    }
public void receiveRequest ( byte [ ] bytes , Transport transport ) throws IOException , WsonrpcException { JsonRpcResponse resp ; try { JsonRpcMessage msg = receive ( bytes ) ; if ( msg instanceof JsonRpcRequest ) { JsonRpcRequest req = ( JsonRpcRequest ) msg ; resp = execute ( req ) ; } else { resp = new JsonRpcResponse ( null , JsonRpcError . invalidRequestError ( null ) ) ; } } catch ( JsonException e ) { resp = new JsonRpcResponse ( null , JsonRpcError . parseError ( e ) ) ; } catch ( IOException e ) { resp = new JsonRpcResponse ( null , JsonRpcError . internalError ( e ) ) ; } transmit ( transport , resp ) ; }
接收远端的调用请求，并将回复执行结果。

@param bytes     接收到的数据
@param transport {@link Transport} 实例
@throws IOException
@throws WsonrpcException