msgpack-rpc ~master
MessagePack RPC for D.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
MessagePack RPC for D
MessagePack RPC implementation based on vibe.d
Example
Client
auto client = new TCPClient(Endpoint(18800, "127.0.0.1"));
// sync request
auto num = client.call!ulong("sum", 1, 2);
// async request: return a Future object
auto future = client.callAsync("sum", 1, 2);
// notify
client.notify("hello", "hoge");
Server
Object
class FooServer
{
ulong sum(ulong l, ulong r)
{
return l + r;
}
void hello(string msg)
{
writeln(msg);
}
}
// TCPServer or UDPServer
auto server = new TCPServer!(FooServer)(new FooServer);
server.listen(Endpoint(18800, "127.0.0.1"));
server.start();
module
module foo;
ulong sum(ulong l, ulong r)
{
return l + r;
}
void hello(string msg)
{
writeln(msg);
}
auto server = new TCPServer!(foo)();
// same as Object
Link
MessagePack official site
Github repository
Copyright
<table> <tr>
<td>Author</td><td>Masahiro Nakagawa <[email protected]></td>
</tr> <tr>
<td>Copyright</td><td>Copyright (c) 2013- Masahiro Nakagawa</td>
</tr> <tr>
<td>License</td><td>MIT License</td>
</tr> </table>
- Registered by Masahiro Nakagawa
- ~master released 5 years ago
- msgpack-rpc/msgpack-rpc-d
- github.com/msgpack-rpc/msgpack-rpc-d
- Boost Software License, Version 1.0
- Copyright (c) 2013- Masahiro Nakagawa
- Authors:
- Dependencies:
- vibe-d, msgpack-d
- Versions:
-
0.1.3 2017-Dec-10 0.1.2 2015-Oct-06 0.1.1 2014-Dec-09 0.1.0 2014-Sep-08 ~master 2019-Jan-10 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
748 downloads total
-
- Score:
- 1.4
- Short URL:
- msgpack-rpc.dub.pm