SeqFileInput HttpClient::send(ConstStrA body) {
	if (request == null) {
		try {
			sendRequest(body.length(), psoAvoid100);
			request->writeAll(body.data(), body.length());
			request->closeOutput();
			loadResponse();
			return SeqFileInput(response.get());
		} catch (NetworkException &) {
			if (connectionReused) {
				closeConnection();
				return send(body);
			}
			throw;
		}
	} else {
		return send();
	}
}
Exemple #2
0
	WordID getWordId(ConstStrA word)
	{
		Crc32 crc32;
		crc32.blockWrite(reinterpret_cast<const byte *>(word.data()), word.length());
		return crc32.getCrc32();
	}