46 #include <visp3/core/vpServer.h> 50 #ifdef VISP_HAVE_FUNC_INET_NTOP 60 serv.checkForConnections();
62 if (serv.getNumberOfClients() > 0) {
63 if (serv.receive(&val) !=
sizeof(int))
64 std::cout <<
"Error while receiving" << std::endl;
66 std::cout <<
"Received : " << val << std::endl;
69 if (serv.send(&val) !=
sizeof(int))
70 std::cout <<
"Error while sending" << std::endl;
72 std::cout <<
"Sending : " << val << std::endl;
77 std::cout <<
"Catch an exception: " << e << std::endl;
81 std::cout <<
"This test doesn't work on win XP where inet_ntop() is not available" << std::endl;
error that can be emited by ViSP classes.
This class represents a Transmission Control Protocol (TCP) server.