diff --git a/TestingAI.d b/TestingAI.d new file mode 100644 index 0000000..2df8791 --- /dev/null +++ b/TestingAI.d @@ -0,0 +1,20 @@ +#!dmd -run + +import core.thread; +import std.stdio; +import std.socket; +import std.conv; +import std.utf; + +void main() { + writeln("Start"); + auto sock = new TcpSocket; + sock.blocking = 1; + sock.connect(new InternetAddress("127.0.0.1", 8080)); + writeln("Connected"); + + auto msg = `{"action":"bind","target":"testnpc"}`; + sock.send(msg.toUTF8); + writeln("Sent"); + Thread.sleep(dur!"seconds"(1)); +} \ No newline at end of file