void testWifiReceiveStatus(const char* ipAddressLocal, const char* ipAddressRemote) { NetworkManager* ourNetworkManager = new NetworkManager; ourNetworkManager->initializeNewConnection("USBSocket", ipAddressLocal, ipAddressRemote, 1024, ConnectionInitType::CONNECT, ConnectionProtocol::TCP); NetworkChunk* chunk = new NetworkChunk; ourNetworkManager->getData("USBSocket", chunk); Status ourStatus(*chunk); }
void testWifiReceiveText(const char* ipAddressLocal, const char* ipAddressRemote) { NetworkManager* ourNetworkManager = new NetworkManager; ourNetworkManager->initializeNewConnection("USBSocket", ipAddressLocal, ipAddressRemote, 1024, ConnectionInitType::CONNECT, ConnectionProtocol::TCP); NetworkChunk* chunk = new NetworkChunk; ourNetworkManager->getData("USBSocket", chunk); Text ourTextMessage(*chunk); //print out length/data of ourTextMessage int length = ourTextMessage.getLength(); VLOG(2) << "Length of our Message "<< length; for (int i=0; i < length; i++) { VLOG(2) << (ourTextMessage.getTextMessage())[i]; } }