Created
October 9, 2013 20:05
-
-
Save rfaisal/6907441 to your computer and use it in GitHub Desktop.
Thrift java client for the math library
This file contains hidden or 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
| public class MathClient { | |
| public static void main(String[] args) throws TException{ | |
| TTransport transport = new TSocket("localhost", 9095); | |
| transport.open(); | |
| TProtocol protocol = new TBinaryProtocol(transport); | |
| MathService.Client client = new MathService.Client(protocol); | |
| System.out.println(client.add(10, 20)); | |
| System.out.println(client.sub(10, 20)); | |
| System.out.println(client.mul(10, 20)); | |
| System.out.println(client.div(10, 20)); | |
| System.out.println(client.mod(10, 20)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment