45 #include <visp3/core/vpServer.h>
58 serv.checkForConnections();
60 if(serv.getNumberOfClients() > 0)
62 if(serv.receive(&val) !=
sizeof(int))
63 std::cout <<
"Error while receiving" << std::endl;
65 std::cout <<
"Received : " << val << std::endl;
68 if(serv.send(&val) !=
sizeof(int))
69 std::cout <<
"Error while sending" << std::endl;
71 std::cout <<
"Sending : " << val << std::endl;
77 std::cout <<
"Catch an exception: " << e << std::endl;
error that can be emited by ViSP classes.
This class represents a Transmission Control Protocol (TCP) server.