int sendATCommandToServiceWithResult(char* line) {
	if (s_fdService_command < 0) {
		connectTarget(GENERIC_TYPE);
	}
	sendDataToGenericService(line);
	return serviceReaderLoopWithResult(line);
}
Example #2
0
	/**
	 * @todo ソケットクローズのスマート化。HTTPResultの方に移して
	 * HTTP headerのConection: closeを見るようにする。
	 */
	http_result_t getResource(const URL& url)
	{
		connectTarget(url);

		// send GET command.
		sendCommand(getGETCommand(url));

		// send HTTP option parameter.
		sendCommand(property.toString());

		// send HTTP request terminater.
		sendCommand(std::string("\r\n"));

		return processGETResponse();
	}