Note that there are some explanatory texts on larger screens.

plurals
  1. POService Multiplexing using Apache Thrift
    primarykey
    data
    text
    <p>Server code:</p> <pre><code> TMultiplexedProcessor processor = new TMultiplexedProcessor(); processor.registerProcessor( "AddService", new AddService.Processor(new AddHandler())); processor.registerProcessor( "MultiplyService", new MultiplyService.Processor(new MultiplyHandler())); TServerTransport serverTransport = new TServerSocket(7911); TSimpleServer server = new TSimpleServer(new TSimpleServer.Args(serverTransport). processor(processor)); System.out.println("Starting server on port 7911 ..."); server.serve(); </code></pre> <p>Client Code:</p> <pre><code> TFramedTransport transport; transport = new TFramedTransport(new TSocket("localhost", 7911)); transport.open(); TProtocol protocol = new TBinaryProtocol(transport); System.out.println("1"); TMultiplexedProtocol mp = new TMultiplexedProtocol(protocol, "AddService"); AddService.Client service = new AddService.Client(mp); System.out.println("2"); TMultiplexedProtocol mp2 = new TMultiplexedProtocol(protocol, "MultiplyService"); MultiplyService.Client service2 = new MultiplyService.Client(mp2); System.out.println("3"); System.out.println(service.add(2,2)); System.out.println(service2.multiply(2000,200)); </code></pre> <p>But when I am running the server(listening on port 7911) and the client, the client doesnt process the last two calls to the add/multiply functions.</p> <p>I could debug that the arguments have been sent to the server, but the server is not able to process them.</p> <p>Any pointers as to what i am missing?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload