New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sazze/thrift

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sazze/thrift

A thrift client/server library

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-80%
Maintainers
2
Weekly downloads
 
Created
Source

@sazze/thrift


Helper library for the thrift nodejs module.

Exampes

These examples expect that your generated thrift code is available in a nodejs module named <thrift_service_module>

Socket Client:

var thrift = require('@sazze/thrift');
var thriftService = require('<thrift_service_module>').Service;

var service = new thriftService.Client();

var options = {
  host: 'localhost',
  port: 9090,
};

var client = thrift.Client(options);

client.call(service.action, [], function (data) {
  //success
}, function (err) {
  // error
});

HTTP Client:

var thrift = require('@sazze/thrift');
var thriftService = require('<thrift_service_module>').Service;

var service = new thriftService.Client();

var options = {
  type: 'http',
  host: 'localhost',
  port: 9090,
  path: '/foo'
};

var client = thrift.Client(options);

clilent.call(service.action, [], function (data) {
  //success
}, function (err) {
  // error
});
Options

  • type: [optional] 'http' or 'socket' (default: 'socket')
  • host: hostname or ip address of the server
  • port: port the server is listening on
  • path: the path where the server is listening (required when type = 'http')
  • service: the thrift service object (from thrift generated code)
  • transport: [optional] the thrift transport to use (default: thrift.TBufferedTransport from the thrift module)
  • protocol: [optional] the thrift protocol to use (default: thrift.TBinaryProtocol from the thrift module)

Keywords

FAQs

Package last updated on 29 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc