ddbus/source/app.d
Tristan Hume 9a028b3a29 Add connection wrappers.
It can actually send messages now!
2015-04-28 21:00:48 -04:00

20 lines
639 B
D

import std.stdio;
import ddbus.c_lib;
import ddbus.thin;
void main()
{
Connection conn = connectToBus();
for(int i = 0; i < 50; i++) {
Message msg = new Message("ca.thume.transience","/ca/thume/transience/screensurface",
"ca.thume.transience.screensurface","testDot");
conn.sendBlocking(msg);
}
Message msg2 = new 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);
writeln("It worked!");
}