2017-12-07 00:31:44 +00:00
|
|
|
import core.time;
|
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) {
|
2015-04-29 01:00:48 +00:00
|
|
|
for(int i = 0; i < 50; i++) {
|
2019-03-17 09:33:55 +00:00
|
|
|
Message msg = Message(busName("ca.thume.transience"), ObjectPath("/ca/thume/transience/screensurface"),
|
|
|
|
interfaceName("ca.thume.transience.screensurface"), "testDot");
|
2015-04-29 01:00:48 +00:00
|
|
|
conn.sendBlocking(msg);
|
|
|
|
}
|
2019-03-17 09:33:55 +00:00
|
|
|
Message msg2 = Message(busName("ca.thume.transience"), ObjectPath("/ca/thume/transience/screensurface"),
|
|
|
|
interfaceName("ca.thume.transience.screensurface"), "testPing");
|
2017-12-07 00:31:44 +00:00
|
|
|
Message res = conn.sendWithReplyBlocking(msg2, 3.seconds);
|
2015-04-29 01:00:48 +00:00
|
|
|
int result = res.read!int();
|
|
|
|
writeln(result);
|
2015-05-02 00:36:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
Connection conn = connectToBus();
|
2017-12-03 12:29:59 +00:00
|
|
|
testCall(conn);
|
2017-12-03 20:59:18 +00:00
|
|
|
writeln("It worked!");
|
2015-04-26 01:46:51 +00:00
|
|
|
}
|