ddbus/examples/client/source/app.d

22 lines
661 B
D
Raw Normal View History

2015-04-26 01:46:51 +00:00
import std.stdio;
2015-05-09 17:15:34 +00:00
import ddbus;
2015-04-26 01:46:51 +00:00
2015-05-02 00:36:06 +00:00
void testCall(Connection conn) {
for(int i = 0; i < 50; i++) {
2015-05-01 20:59:40 +00:00
Message msg = Message("ca.thume.transience","/ca/thume/transience/screensurface",
"ca.thume.transience.screensurface","testDot");
conn.sendBlocking(msg);
}
2015-05-01 20:59:40 +00:00
Message msg2 = Message("ca.thume.transience","/ca/thume/transience/screensurface",
"ca.thume.transience.screensurface","testPing");
Message res = conn.sendWithReplyBlocking(msg2,3000);
int result = res.read!int();
writeln(result);
2015-05-02 00:36:06 +00:00
}
void main() {
Connection conn = connectToBus();
testCall(conn);
2017-12-03 20:59:18 +00:00
writeln("It worked!");
2015-04-26 01:46:51 +00:00
}