FIX:fixed some issues in the tcp client
This commit is contained in:
@@ -19,6 +19,7 @@ namespace DirectCommunication
|
||||
|
||||
socket_.connect("tcp://"+serverAddress_+":"+std::to_string(port_));
|
||||
socket_.set(zmq::sockopt::rcvtimeo,100);
|
||||
socket_.set(zmq::sockopt::sndtimeo,500);
|
||||
|
||||
Worker_ = std::thread(&DirectCommunicationClient::workerFunc_,this);
|
||||
stopWorker_ = false;
|
||||
@@ -74,7 +75,7 @@ namespace DirectCommunication
|
||||
|
||||
if (recv > 0)
|
||||
{
|
||||
|
||||
isConnected = true;
|
||||
if (msg.to_string() == "CLOSE")
|
||||
{
|
||||
isConnected = false;
|
||||
|
||||
Reference in New Issue
Block a user