mirror of
https://github.com/modelec/detection_pot.git
synced 2026-03-27 01:39:38 +01:00
Check if the clientSocket open well
This commit is contained in:
@@ -267,6 +267,7 @@ void ArucoDetector::setNonBlocking(int sockfd) {
|
||||
void ArucoDetector::sendData(int serverSocket, const std::string& data) {
|
||||
std::cout << "Sending Data" << std::endl;
|
||||
int clientSocket = accept(serverSocket, nullptr, nullptr);
|
||||
std::cout << "Client Socket: " << clientSocket << std::endl;
|
||||
if(clientSocket == -1 && errno != EWOULDBLOCK && errno != EAGAIN) {
|
||||
perror("accept");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user