49 #include <visp/vpServer.h>
62 serv.checkForConnections();
64 if(serv.getNumberOfClients() > 0)
66 if(serv.receive(&val) !=
sizeof(int))
67 std::cout <<
"Error while receiving" << std::endl;
69 std::cout <<
"Received : " << val << std::endl;
72 if(serv.send(&val) !=
sizeof(int))
73 std::cout <<
"Error while sending" << std::endl;
75 std::cout <<
"Sending : " << val << std::endl;
81 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.