+ moof::resource::register_type<MyAsset>("mine");
+ //moof::resource::add_type<AnotherAsset>("k");
+
+ //{
+ //moof::resource_ptr myAsset = moof::resource::load(assetName,
+ //"prefix", "mine");
+
+ //MyAsset_handle aCopy = myAsset;
+
+ //MyAsset_handle copy2 = moof::resource::load(assetName, "asdfas", "mine");
+
+ ////if (myAsset->check<MyAsset>()) myAsset->get<AnotherAsset>()->cool();
+ //myAsset->get<MyAsset>()->cool();
+ ////myAsset->get<AnotherAsset>()->groovy();
+
+ //aCopy.get()->cool();
+ //copy2.get()->cool();
+
+ //log_info("rsrc ptr:", moof::resource::load(assetName, "", "mine"));
+ //}
+ //log_info("rsrc ptr:", moof::resource::load(assetName, "", "k"));
+ //moof::resource::load(assetName, "", "mine")->get<MyAsset>()->cool();
+
+ ////if (myAsset) myAsset.get()->cool();
+ ////else moof::log_error("asset not obtained...");
+
+ MyAsset_handle myAsset = moof::resource::load("/home/chaz/meh.mine");
+ MyAsset* asset = myAsset.get();
+ if (asset) asset->cool();
+ else moof::log_warning("no asset obtained!!");
+
+ moof::timer reloadTimer(
+ boost::bind(&moof::resource::reload_as_needed),
+ SCALAR(2.0),
+ moof::timer::repeat);
+
+ //for (;;)
+ //{
+ //myAsset.get()->cool();
+ //moof::resource::reload_as_needed();
+ //sleep(1);
+ //}
+
+ //return 0;
+
+ 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;
+
+