- packet << uint16_t(45);
- Mf::logInfo << "packet size: " << packet.size() << std::endl;
- packet << uint64_t(1234567812345679ULL);
- Mf::logInfo << "packet size: " << packet.size() << std::endl;
-
- packet << true << false << false << true << false << true << true;
- Mf::logInfo << "packet size: " << packet.size() << std::endl;
-
- std::vector<short> hi;
- hi.push_back(34);
- hi.push_back(-12345);
- hi.push_back(7734);
-
- for (int a = 0; a < 15900; a++)
- {
- hi.push_back(a);
- }
-
- packet << hi;
- Mf::logInfo << "packet size: " << packet.size() << std::endl;
-
- packet << "hello world";
- Mf::logInfo << "packet size: " << packet.size() << std::endl;
-
- packet << false << false << false << true << false;
- Mf::logInfo << "packet size: " << packet.size() << std::endl;
-
-
- Mf::SocketAddress addr = Mf::SocketAddress::broadcast("4950");
- //Mf::logInfo << "local addr: " << addr.name() << std::endl;
-
- //for (it = task.addresses().begin(); it != task.addresses().end(); ++it)
- //{
- int bcast = 0;
-
- //Mf::SocketAddress addr = *it;
- Mf::Socket sock(addr);
-
- sock.get(SO_BROADCAST, bcast);
- Mf::logInfo << "bcast: " << bcast << std::endl;
-
- sock.set(SO_BROADCAST, 1);
-
- sock.get(SO_BROADCAST, bcast);
- Mf::logInfo << "bcast: " << bcast << std::endl;
-
- sock.write(packet);
- //}
-
-
- return 0;