+ moof::resolver_task task("4950", "lappy");
+ task.run();
+
+ int i = task.wait();
+ moof::log_warning("task ended with code:", i);
+
+ std::vector<moof::socket::address>::const_iterator it;
+ for (it = task.addresses().begin(); it != task.addresses().end(); ++it)
+ {
+ moof::socket::address addr = *it;
+
+ moof::log_info("address:", addr, "(", addr.type(), ")");
+ }
+
+ //ASSERT(5 == 8 && "uh oh that's not right");
+
+
+ std::vector<uint8_t> hi;
+ for (int a = 0; a < 4000; a++)
+ {
+ hi.push_back(a);
+ }
+
+ moof::log_info("array size:", hi.size());
+ moof::packet packet;
+ packet << hi;
+
+ //for (it = task.addresses().begin(); it != task.addresses().end(); ++it)
+ //{
+ //moof::socket sock(*it);
+ moof::socket sock(moof::socket::address::broadcast("4950"));
+ //moof::socket sock("4950", "lappy", SOCK_DGRAM);
+ sock.set(SO_BROADCAST, 1);
+ sock.connect();
+
+ //if (sock.isConnected())
+ //{
+ moof::packet pack;
+ pack << "hello world";
+ sock.write(pack);
+ //sock.write(pack, sock.address());
+ moof::log_info("sent", pack.size(), "bytes");
+
+ const char* data = pack.bytes();
+ for (unsigned i = 0; i < pack.size(); ++i)
+ {
+ moof::log_warning("meh:", data[i]);
+ }
+
+ char data2[56];
+ pack.read(data2, 13);
+ for (int i = 0; i < 13; ++i)
+ {
+ moof::log_warning("meh:", data2[i]);
+ }
+ //}
+ //else
+ //{
+ //moof::log_error("NOT CONNECTED");
+ //}
+ //}
+
+
+ //return 0;
+
+