Erlang C++语言绑定
2016-05-18
0 0 0
暂无评分
其他
如何获取积分?
eipp is a C++ library that offers a simple and safe interface to Erlang External Term format. Example:
``` using namespace eipp; using namespace std;
int main() { while(1) { atom_t cmd; // atom type... think std::string et data; // generic "erlang term" type
// expect tuple of the form {CmdAtom, Data}
untuple(cmd,data)=binary_to_term(receive4(cin));
// Only one command supported for now...
if(cmd=="times2")
{
int num=data; // "et" can cast itself to many types
num*=2;
send4(cout,term_to_binary(tuple("ok",num)));
}
}
} ```
The library only supports ETF encoding/decoding and port compatible packet encoding, but this will grow in the future.
erlang
CPlusPlus
DevTool
相关源码推荐
Qt
1
0
暂无评分
编源代码
0
0
暂无评分
新的MANET路由协议和网络/ inetmanet OMNET++
1
0
暂无评分
百度C / C++连接框架
0
0
暂无评分
ortholab
0
0
暂无评分
暂无评论