javascript Thrift client hangs

前端 未结 1 1254
清酒与你
清酒与你 2021-01-24 23:05

I have the following Thrift client code in javascript:



        
相关标签:
1条回答
  • 2021-01-24 23:38

    You mix a HTTP client with a socket server.

    Although HTTP uses sockets, the Thrift HTTP transport is not compatible with the Thrift Sockets transport. You need to set up the exact same protocol/transport stack on both ends. The only exception to that rule is that some server transports implicitly require an additional framed transport layer on the client side.

    So the solution is to use a HTTP server. Depending on the version you use, you may also have to switch to the JSON protocol.

    0 讨论(0)
提交回复
热议问题