Exemple #1
0
void Socket::sendString(std::string const & iMessage)
{
	zmq::message_t aZmqMessage(iMessage.size());
	memcpy((void *) aZmqMessage.data(), iMessage.c_str(), iMessage.size());

	m_zmqSocket->send(aZmqMessage);
	ORWELL_LOG_TRACE("Sent " << iMessage );
}
Exemple #2
0
void Socket::sendString(std::string const & iMessage)
{
	zmq::message_t aZmqMessage(iMessage.size());
	memcpy((void *) aZmqMessage.data(), iMessage.c_str(), iMessage.size());

	try
	{
		m_zmqSocket->send(aZmqMessage);
		ORWELL_LOG_TRACE("Sent " << iMessage);
	}
	catch (...)
	{
		ORWELL_LOG_TRACE("Failed to send zmq message.");
	}
}