`
sankooc
  • 浏览: 4062 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

thrift在nodejs中发生Error: read(4) failed - not enough data

    博客分类:
  • node
阅读更多
主要原因是因为使用了默认的transport使用tframetrasport 即可
var thrift = require('thrift');
ttransport = require('thrift').TFramedTransport;
var webapi = require('./lib/gen-nodejs/WebApi');
var connection = thrift.createConnection("localhost", 9090, {transport: ttransport});
client = thrift.createClient(webapi, connection);
client.addUser({'ad':'dd'},'sankooc');


参考http://mail-archives.apache.org/mod_mbox/thrift-user/201308.mbox/%3CCAPtH0jZZ=FQGP0VxOmxM7oH-BCz3S6wTooG7R84KA-==F=nciA@mail.gmail.com%3E
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics