src/SocketCommand.cpp
branchv_0
changeset 1 d93ea7346b66
parent 0 e8f15f432efc
child 3 2b57c8683ffe
--- a/src/SocketCommand.cpp	Sun May 01 18:42:53 2022 +0200
+++ b/src/SocketCommand.cpp	Tue Jul 26 23:22:24 2022 +0200
@@ -47,7 +47,7 @@
 void SocketCommand::process(std::shared_ptr<writer::RelationalWriter> writer, Configuration& configuration) {
 	vector<AttributeMetadata> metadata;
 
-	std::shared_ptr<Socket> mq(Socket::open(convertor.to_bytes(configuration.queue), configuration.unlinkOnClose));
+	std::shared_ptr<Socket> socket = std::make_shared<Socket>(); // TODO: create a TCP, UDP… socket
 
 	writer->startRelation(configuration.relation,{
 		{L"queue", TypeId::STRING},
@@ -57,7 +57,7 @@
 
 	for (int i = configuration.messageCount; continueProcessing && i > 0; i--) {
 		// TODO: maybe rather call mq_timedreceive() inside and check continueProcessing (to be able to stop even when no messages are comming)
-		std::string message = mq->receive();
+		std::string message = socket->receive();
 
 		writer->writeAttribute(configuration.queue);
 		writer->writeAttribute(Hex::toTxt(message));