void setUp()
	{
		testDataDecoded = "ABCDEFGHIJKLMNOPQRSTUVWXYZ \x12\x34\x56\x78\x90 abcdefghijklmnopqrstuvwxyz0123456789";
		testDataEncoded = "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVogEjRWeJAgYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5";

		std::ostringstream testFilePath;
		testFilePath << "/tmp/vmime_test_" << (rand() % 999999999);

		vmime::ref <vmime::utility::fileSystemFactory> fsf =
			vmime::platform::getHandler()->getFileSystemFactory();

		testFile = fsf->create(fsf->stringToPath(testFilePath.str()));
		testFile->createFile();
		testFile->getFileWriter()->getOutputStream()->write(testDataEncoded.data(), testDataEncoded.length());
	}
示例#2
0
void posixSocket::send(const vmime::string& buffer)
{
	sendRaw(buffer.data(), buffer.length());
}
示例#3
0
void windowsSocket::send(const vmime::string& buffer)
{
	::send(m_desc, buffer.data(), buffer.length(), 0);
}