41 #include <visp3/core/vpServer.h>
45 #ifdef ENABLE_VISP_NAMESPACE
48 #ifdef VISP_HAVE_FUNC_INET_NTOP
58 serv.checkForConnections();
60 if (serv.getNumberOfClients() > 0) {
61 if (serv.receive(&val) !=
sizeof(
int))
62 std::cout <<
"Error while receiving" << std::endl;
64 std::cout <<
"Received : " << val << std::endl;
67 if (serv.send(&val) !=
sizeof(
int))
68 std::cout <<
"Error while sending" << std::endl;
70 std::cout <<
"Sending : " << val << std::endl;
76 std::cout <<
"Catch an exception: " << e << std::endl;
80 std::cout <<
"This test doesn't work on win XP where inet_ntop() is not available" << std::endl;
error that can be emitted by ViSP classes.
This class represents a Transmission Control Protocol (TCP) server.