Node.js Fast

码农软件 · 软件分类 · JSON/BSON开发包 · 2019-03-31 12:13:21

软件介绍

Fast 是 Node.js 的一个很小的基于 TCP 消息框架的 JSON 远程调用包,可用来编写简单的基于 JSON 的 RPC 系统。

示例代码:

var fast = require('fast');
var server = fast.createServer();

server.rpc('echo', function (fname, lname, res) {
    res.write({first: fname});
    res.end({last: lname});
});

server.listen(1234);

/// Client
var client = fast.createClient({host: 'localhost', port: 1234});
client.on('connect', function () {
    var req = client.rpc('echo', 'mark', 'cavage');
    req.on('message', function (obj) {
        console.log(JSON.stringify(obj, null, 2));
    });
    req.on('end', function () {
        client.close();
        server.close();
    });
});

本文地址:https://www.codercto.com/soft/d/2548.html

Computers and Intractability

Computers and Intractability

M R Garey、D S Johnson / W. H. Freeman / 1979-4-26 / GBP 53.99

This book's introduction features a humorous story of a man with a line of people behind him, who explains to his boss, "I can't find an efficient algorithm, but neither can all these famous people." ......一起来看看 《Computers and Intractability》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

SHA 加密
SHA 加密

SHA 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具