Visual Servoing Platform  version 3.5.1 under development (2023-09-22)
vpClient Class Reference

#include <visp3/core/vpClient.h>

+ Inheritance diagram for vpClient:

Public Member Functions

 vpClient ()
 
virtual ~vpClient ()
 
bool connectToHostname (const std::string &hostname, const unsigned int &port_serv)
 
bool connectToIP (const std::string &ip, const unsigned int &port_serv)
 
void deconnect (const unsigned int &index=0)
 
unsigned int getNumberOfAttempts ()
 
unsigned int getNumberOfServers ()
 
void print ()
 
void setNumberOfAttempts (const unsigned int &nb)
 
void stop ()
 
void addDecodingRequest (vpRequest *)
 
int getReceptorIndex (const char *name)
 
std::string getRequestIdFromIndex (const int &ind)
 
unsigned int getMaxSizeReceivedMessage ()
 
void print (const char *id="")
 
template<typename T >
int receive (T *object, const unsigned int &sizeOfObject=sizeof(T))
 
template<typename T >
int receiveFrom (T *object, const unsigned int &receptorEmitting, const unsigned int &sizeOfObject=sizeof(T))
 
std::vector< int > receiveRequest ()
 
std::vector< int > receiveRequestFrom (const unsigned int &receptorEmitting)
 
int receiveRequestOnce ()
 
int receiveRequestOnceFrom (const unsigned int &receptorEmitting)
 
std::vector< int > receiveAndDecodeRequest ()
 
std::vector< int > receiveAndDecodeRequestFrom (const unsigned int &receptorEmitting)
 
int receiveAndDecodeRequestOnce ()
 
int receiveAndDecodeRequestOnceFrom (const unsigned int &receptorEmitting)
 
void removeDecodingRequest (const char *)
 
template<typename T >
int send (T *object, const int unsigned &sizeOfObject=sizeof(T))
 
template<typename T >
int send (T *object, const unsigned int &sizeOfObject)
 
template<typename T >
int sendTo (T *object, const unsigned int &dest, const unsigned int &sizeOfObject=sizeof(T))
 
int sendRequest (vpRequest &req)
 
int sendRequestTo (vpRequest &req, const unsigned int &dest)
 
int sendAndEncodeRequest (vpRequest &req)
 
int sendAndEncodeRequestTo (vpRequest &req, const unsigned int &dest)
 
void setMaxSizeReceivedMessage (const unsigned int &s)
 
void setTimeoutSec (const long &sec)
 
void setTimeoutUSec (const long &usec)
 
void setVerbose (const bool &mode)
 

Protected Attributes

vpEmitter emitter
 
std::vector< vpReceptor > receptor_list
 
fd_set readFileDescriptor
 
int socketMax
 
std::vector< vpRequest * > request_list
 
unsigned int max_size_message
 
std::string separator
 
std::string beginning
 
std::string end
 
std::string param_sep
 
std::string currentMessageReceived
 
struct timeval tv
 
long tv_sec
 
long tv_usec
 
bool verboseMode
 

Detailed Description

This class represents a Transmission Control Protocol (TCP) client.

TCP provides reliable, ordered delivery of a stream of bytes from a program on one computer to another program on another computer.

Exemple of client's code, receiving and sending basic message It corresponds to the client used in the first example of vpServer class' documentation:

#include <iostream>
#include <visp3/core/vpClient.h>
int main()
{
std::string servername = "localhost";
unsigned int port = 35000;
vpClient client;
client.connectToHostname(servername, port);
//client.connectToIP("127.0.0.1",port);
int val = 0;
while(1)
{
// Sending the new value to the first client
if(client.send(&val) != sizeof(int))
std::cout << "Error while sending" << std::endl;
else
std::cout << "Sending : " << val << std::endl;
// Receiving a value from the first client
if(client.receive(&val) != sizeof(int))
std::cout << "Error while receiving" << std::endl;
else
std::cout << "Received : " << val << std::endl;
}
return 0;
}
This class represents a Transmission Control Protocol (TCP) client.
Definition: vpClient.h:163
bool connectToHostname(const std::string &hostname, const unsigned int &port_serv)
Definition: vpClient.cpp:62
int send(T *object, const int unsigned &sizeOfObject=sizeof(T))
int receive(T *object, const unsigned int &sizeOfObject=sizeof(T))
Definition: vpNetwork.h:280

Exemple of client's code, sending a vpImage on request form. It correspond to the server used in the second example of vpServer class' documentation.

#include <iostream>
#include <visp3/core/vpClient.h>
#include <visp3/core/vpImage.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/sensor/vpV4l2Grabber.h>
#include "vpRequestImage.h" //See vpRequest class documentation
int main(int argc, char **argv)
{
#if defined(VISP_HAVE_V4L2)
std::string servername = "localhost";
unsigned int port = 35000;
vpImage<unsigned char> I; // Create a gray level image container
// Create a grabber based on v4l2 third party lib (for usb cameras under
// Linux)
g.setScale(1);
g.setInput(0);
g.open(I);
// Create an image viewer
#if defined(VISP_HAVE_X11)
vpDisplayX d(I, -1, -1, "Camera frame");
#elif defined(VISP_HAVE_GDI) //Win32
vpDisplayGDI d(I, -1, -1, "Camera frame");
#endif
vpClient client;
client.connectToHostname(servername, port);
//client.connectToIP("127.0.0.1",port);
vpRequestImage reqImage(&I);
while(1)
{
double t = vpTime::measureTimeMs();
// Acquire a new image
g.acquire(I);
client.sendAndEncodeRequest(reqImage);
// A click in the viewer to exit
if ( vpDisplay::getClick(I, false) )
break;
}
return 0;
#endif
}
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:128
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
Definition: vpDisplayX.h:132
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void display(const vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
int sendAndEncodeRequest(vpRequest &req)
Definition: vpNetwork.cpp:241
Class that is a wrapper over the Video4Linux2 (V4L2) driver.
void setInput(unsigned input=vpV4l2Grabber::DEFAULT_INPUT)
void open(vpImage< unsigned char > &I)
void setScale(unsigned scale=vpV4l2Grabber::DEFAULT_SCALE)
void acquire(vpImage< unsigned char > &I)
VISP_EXPORT double measureTimeMs()
See also
vpClient
vpRequest
vpNetwork
Examples
testClient.cpp.

Definition at line 162 of file vpClient.h.

Constructor & Destructor Documentation

◆ vpClient()

vpClient::vpClient ( )

Definition at line 44 of file vpClient.cpp.

◆ ~vpClient()

vpClient::~vpClient ( )
virtual

Disconnect the client from all the servers, and close the sockets.

Definition at line 49 of file vpClient.cpp.

References stop().

Member Function Documentation

◆ addDecodingRequest()

void vpNetwork::addDecodingRequest ( vpRequest req)
inherited

Add a decoding request to the emitter. This request will be used to decode the received messages. Each request must have a different id.

Warning
vpRequest is a virtual pure class. It has to be implemented according to the way how you want to decode the message received.
See also
vpNetwork::removeDecodingRequest()
Parameters
req: Request to add.

Definition at line 83 of file vpNetwork.cpp.

References vpRequest::getId(), and vpNetwork::request_list.

◆ connectToHostname()

bool vpClient::connectToHostname ( const std::string &  hostname,
const unsigned int &  port_serv 
)

Connect to the server represented by the given hostname, and at a given port.

See also
vpClient::connectToIP();
Parameters
hostname: Hostname of the server.
port_serv: Port used for the connection.
Returns
True if the connection has been etablished, false otherwise.
Examples
testClient.cpp.

Definition at line 62 of file vpClient.cpp.

References vpERROR_TRACE.

◆ connectToIP()

bool vpClient::connectToIP ( const std::string &  ip,
const unsigned int &  port_serv 
)

Connect to the server represented by the given ip, and at a given port.

See also
vpClient::connectToHostname()
Parameters
ip: IP of the server.
port_serv: Port used for the connection.
Returns
True if the connection has been etablished, false otherwise.

Definition at line 109 of file vpClient.cpp.

References vpERROR_TRACE.

◆ deconnect()

void vpClient::deconnect ( const unsigned int &  index = 0)

Deconnect from the server at a specific index.

Parameters
index: Index of the server.

Definition at line 137 of file vpClient.cpp.

References vpNetwork::receptor_list.

◆ getMaxSizeReceivedMessage()

unsigned int vpNetwork::getMaxSizeReceivedMessage ( )
inlineinherited

Get the maximum size that the emitter can receive (in request mode).

See also
vpNetwork::setMaxSizeReceivedMessage()
Returns
Acutal max size value.

Definition at line 190 of file vpNetwork.h.

◆ getNumberOfAttempts()

unsigned int vpClient::getNumberOfAttempts ( )
inline

Get the actual number of attempts to connect to the server.

See also
vpClient::setNumberOfAttempts()
Returns
Actual number of attempts.

Definition at line 192 of file vpClient.h.

◆ getNumberOfServers()

unsigned int vpClient::getNumberOfServers ( )
inline

Get the number of server that the client is connected on.

Returns
Number of servers.

Definition at line 199 of file vpClient.h.

◆ getReceptorIndex()

int vpNetwork::getReceptorIndex ( const char *  name)
inherited

Get the receptor index from its name. The name can be either the IP, or its name on the network.

Parameters
name: Name of the receptor.
Returns
Index of the receptor, or -1 if an error occurs.

Definition at line 138 of file vpNetwork.cpp.

References vpNetwork::receptor_list, and vpERROR_TRACE.

◆ getRequestIdFromIndex()

std::string vpNetwork::getRequestIdFromIndex ( const int &  ind)
inlineinherited

Get the Id of the request at the index ind.

Parameters
ind: Index of the request.
Returns
Id of the request.

Definition at line 176 of file vpNetwork.h.

◆ print() [1/2]

void vpClient::print ( )

Print the servers.

Definition at line 168 of file vpClient.cpp.

References vpNetwork::print().

◆ print() [2/2]

void vpNetwork::print ( const char *  id = "")
inherited

Print the receptors.

Parameters
id: Message to display before the receptor's index.

Definition at line 123 of file vpNetwork.cpp.

References vpNetwork::receptor_list.

Referenced by print(), and vpServer::print().

◆ receive()

template<typename T >
int vpNetwork::receive ( T *  object,
const unsigned int &  sizeOfObject = sizeof(T) 
)
inherited

Receives a object. The size of the received object is suppose to be the size of the type of the object. Note that a received message can correspond to a deconnection signal.

Warning
Using this function means that you know what kind of object you are suppose to receive, and when you are suppose to receive. If the emitter has several receptors. It might be a problem, and in that case you better use the "request" option.
See also
vpNetwork::receiveRequest()
vpNetwork::receiveRequestOnce()
vpNetwork::receiveAndDecodeRequest()
vpNetwork::receiveAndDecodeRequestOnce()
Parameters
object: Received object.
sizeOfObject: Size of the received object.
Returns
the number of bytes received, or -1 if an error occured.
Examples
testClient.cpp, and testServer.cpp.

Definition at line 280 of file vpNetwork.h.

References vpNetwork::readFileDescriptor, vpNetwork::receptor_list, vpNetwork::socketMax, vpNetwork::tv, vpNetwork::tv_sec, vpNetwork::tv_usec, vpNetwork::verboseMode, vpERROR_TRACE, and vpTRACE.

◆ receiveAndDecodeRequest()

std::vector< int > vpNetwork::receiveAndDecodeRequest ( )
inherited

◆ receiveAndDecodeRequestFrom()

std::vector< int > vpNetwork::receiveAndDecodeRequestFrom ( const unsigned int &  receptorEmitting)
inherited

Receives and decode requests, from a specific emitter, until there is request to receive.

Warning
Requests will be received but not decoded.
See also
vpNetwork::receive()
vpNetwork::receiveRequest()
vpNetwork::receiveRequestOnce()
vpNetwork::receiveRequestOnceFrom()
vpNetwork::receiveAndDecodeRequest()
vpNetwork::receiveAndDecodeRequestFrom()
vpNetwork::receiveAndDecodeRequestOnce()
vpNetwork::receiveAndDecodeRequestOnceFrom()
Parameters
receptorEmitting: Index of the receptor emitting the message

Definition at line 402 of file vpNetwork.cpp.

References vpNetwork::receiveRequestFrom(), and vpNetwork::request_list.

◆ receiveAndDecodeRequestOnce()

int vpNetwork::receiveAndDecodeRequestOnce ( )
inherited

Receives a message once (in the limit of the Maximum message size value). This message can represent an entire request or not. Several calls to this function might be necessary to get the entire request. If it represents an entire request, it decodes the request.

Warning
Requests will be received but not decoded.
See also
vpNetwork::receive()
vpNetwork::receiveRequestFrom()
vpNetwork::receiveRequest()
vpNetwork::receiveRequestOnceFrom()
vpNetwork::receiveAndDecodeRequest()
vpNetwork::receiveAndDecodeRequestFrom()
vpNetwork::receiveAndDecodeRequestOnce()
vpNetwork::receiveAndDecodeRequestOnceFrom()
Returns
The number of bytes received, -1 if an error occured.

Definition at line 432 of file vpNetwork.cpp.

References vpNetwork::receiveRequestOnce(), and vpNetwork::request_list.

◆ receiveAndDecodeRequestOnceFrom()

int vpNetwork::receiveAndDecodeRequestOnceFrom ( const unsigned int &  receptorEmitting)
inherited

Receives a message once (in the limit of the Maximum message size value), from a specific emitter. This message can represent an entire request or not. Several calls to this function might be necessary to get the entire request. If it represents an entire request, it decodes the request.

Warning
Requests will be received but not decoded.
See also
vpNetwork::receive()
vpNetwork::receiveRequestFrom()
vpNetwork::receiveRequest()
vpNetwork::receiveRequestOnce()
vpNetwork::receiveAndDecodeRequest()
vpNetwork::receiveAndDecodeRequestFrom()
vpNetwork::receiveAndDecodeRequestOnce()
vpNetwork::receiveAndDecodeRequestOnceFrom()
Parameters
receptorEmitting: Index of the receptor emitting the message.
Returns
The number of bytes received, -1 if an error occured.

Definition at line 462 of file vpNetwork.cpp.

References vpNetwork::receiveRequestOnceFrom(), and vpNetwork::request_list.

◆ receiveFrom()

template<typename T >
int vpNetwork::receiveFrom ( T *  object,
const unsigned int &  receptorEmitting,
const unsigned int &  sizeOfObject = sizeof(T) 
)
inherited

Receives a object from a receptor, by specifying its size or not. Note that a received message can correspond to a deconnection signal.

Warning
Using this function means that you know what kind of object you are suppose to receive, and when you are suppose to receive. If the emitter has several receptors. It might be a problem, and in that case you better use the "request" mode.
See also
vpNetwork::getReceptorIndex()
vpNetwork::receiveRequestFrom()
vpNetwork::receiveRequestOnceFrom()
vpNetwork::receiveAndDecodeRequestFrom()
vpNetwork::receiveAndDecodeRequestOnceFrom()
Parameters
object: Received object.
receptorEmitting: Index of the receptor emitting the message.
sizeOfObject: Size of the received object.
Returns
the number of bytes received, or -1 if an error occured.

Definition at line 364 of file vpNetwork.h.

References vpNetwork::readFileDescriptor, vpNetwork::receptor_list, vpNetwork::socketMax, vpNetwork::tv, vpNetwork::tv_sec, vpNetwork::tv_usec, vpNetwork::verboseMode, vpERROR_TRACE, and vpTRACE.

◆ receiveRequest()

std::vector< int > vpNetwork::receiveRequest ( )
inherited

◆ receiveRequestFrom()

std::vector< int > vpNetwork::receiveRequestFrom ( const unsigned int &  receptorEmitting)
inherited

Receives requests, from a specific emitter, until there is request to receive.

Warning
Requests will be received but not decoded.
See also
vpNetwork::receive()
vpNetwork::receiveRequest()
vpNetwork::receiveRequestOnce()
vpNetwork::receiveRequestOnceFrom()
vpNetwork::receiveAndDecodeRequest()
vpNetwork::receiveAndDecodeRequestFrom()
vpNetwork::receiveAndDecodeRequestOnce()
vpNetwork::receiveAndDecodeRequestOnceFrom()
Parameters
receptorEmitting: Index of the receptor emitting the message

Definition at line 304 of file vpNetwork.cpp.

Referenced by vpNetwork::receiveAndDecodeRequestFrom().

◆ receiveRequestOnce()

int vpNetwork::receiveRequestOnce ( )
inherited

Receives a message once (in the limit of the Maximum message size value). This message can represent an entire request or not. Several calls to this function might be necessary to get the entire request.

Warning
Requests will be received but not decoded.
See also
vpNetwork::receive()
vpNetwork::receiveRequestFrom()
vpNetwork::receiveRequest()
vpNetwork::receiveRequestOnceFrom()
vpNetwork::receiveAndDecodeRequest()
vpNetwork::receiveAndDecodeRequestFrom()
vpNetwork::receiveAndDecodeRequestOnce()
vpNetwork::receiveAndDecodeRequestOnceFrom()
Returns
The number of bytes received, -1 if an error occured.

Definition at line 328 of file vpNetwork.cpp.

Referenced by vpNetwork::receiveAndDecodeRequestOnce().

◆ receiveRequestOnceFrom()

int vpNetwork::receiveRequestOnceFrom ( const unsigned int &  receptorEmitting)
inherited

Receives a message once (in the limit of the Maximum message size value), from a specific emitter. This message can represent an entire request or not. Several calls to this function might be necessary to get the entire request.

Warning
Requests will be received but not decoded.
See also
vpNetwork::receive()
vpNetwork::receiveRequestFrom()
vpNetwork::receiveRequest()
vpNetwork::receiveRequestOnce()
vpNetwork::receiveAndDecodeRequest()
vpNetwork::receiveAndDecodeRequestFrom()
vpNetwork::receiveAndDecodeRequestOnce()
vpNetwork::receiveAndDecodeRequestOnceFrom()
Parameters
receptorEmitting: Index of the receptor emitting the message.
Returns
The number of bytes received, -1 if an error occured.

Definition at line 355 of file vpNetwork.cpp.

Referenced by vpNetwork::receiveAndDecodeRequestOnceFrom().

◆ removeDecodingRequest()

void vpNetwork::removeDecodingRequest ( const char *  id)
inherited

Delete a decoding request from the emitter.

See also
vpNetwork::addDecodingRequest()
Parameters
id: Id of the request to delete.

Definition at line 108 of file vpNetwork.cpp.

References vpNetwork::request_list.

◆ send() [1/2]

template<typename T >
int vpNetwork::send ( T *  object,
const int unsigned &  sizeOfObject = sizeof(T) 
)
inherited

◆ send() [2/2]

template<typename T >
int vpNetwork::send ( T *  object,
const unsigned int &  sizeOfObject 
)
inherited

Send an object. The size of the received object is suppose to be the size of its type. Note that sending object containing pointers, virtual methods, etc, won't probably work.

Warning
Using this function means that, in the other side of the network, it knows what kind of object it is suppose to receive, and when it is suppose to receive. If the emitter has several receptors. It might be a problem, and in that case you better use the "request" option.
See also
vpNetwork::sendTo()
vpNetwork::sendRequest()
vpNetwork::sendRequestTo()
vpNetwork::sendAndEncodeRequest()
vpNetwork::sendAndEncodeRequestTo()
Parameters
object: Received object.
sizeOfObject: Size of the object
Returns
The number of bytes sent, or -1 if an error happened.

Definition at line 438 of file vpNetwork.h.

References vpNetwork::receptor_list, vpNetwork::verboseMode, and vpTRACE.

◆ sendAndEncodeRequest()

int vpNetwork::sendAndEncodeRequest ( vpRequest req)
inherited

Send and encode a request to the first receptor in the list.

See also
vpNetwork::sendRequestTo()
vpNetwork::sendAndEncodeRequest()
vpNetwork::sendAndEncodeRequestTo()
vpNetwork::send()
vpNetwork::sendTo()
Parameters
req: Request to send.
Returns
The number of bytes that have been sent, -1 if an error occured.

Definition at line 241 of file vpNetwork.cpp.

References vpRequest::encode(), and vpNetwork::sendRequest().

◆ sendAndEncodeRequestTo()

int vpNetwork::sendAndEncodeRequestTo ( vpRequest req,
const unsigned int &  dest 
)
inherited

Send and encode a request to a specific receptor.

See also
vpNetwork::sendRequest()
vpNetwork::sendAndEncodeRequest()
vpNetwork::sendAndEncodeRequestTo()
vpNetwork::send()
vpNetwork::sendTo()
Parameters
req: Request to send.
dest: Index of the receptor receiving the request.
Returns
The number of bytes that have been sent, -1 if an error occured.

Definition at line 261 of file vpNetwork.cpp.

References vpRequest::encode(), and vpNetwork::sendRequestTo().

◆ sendRequest()

int vpNetwork::sendRequest ( vpRequest req)
inherited

Send a request to the first receptor in the list.

See also
vpNetwork::sendRequestTo()
vpNetwork::sendAndEncodeRequest()
vpNetwork::sendAndEncodeRequestTo()
vpNetwork::send()
vpNetwork::sendTo()
Parameters
req: Request to send.
Returns
The number of bytes that have been sent, -1 if an error occured.

Definition at line 173 of file vpNetwork.cpp.

References vpNetwork::sendRequestTo().

Referenced by vpNetwork::sendAndEncodeRequest().

◆ sendRequestTo()

int vpNetwork::sendRequestTo ( vpRequest req,
const unsigned int &  dest 
)
inherited

Send a request to a specific receptor.

See also
vpNetwork::sendRequest()
vpNetwork::sendAndEncodeRequest()
vpNetwork::sendAndEncodeRequestTo()
vpNetwork::send()
vpNetwork::sendTo()
Parameters
req: Request to send.
dest: Index of the receptor receiving the request.
Returns
The number of bytes that have been sent, -1 if an error occured.

Definition at line 189 of file vpNetwork.cpp.

References vpNetwork::beginning, vpNetwork::end, vpRequest::getId(), vpNetwork::param_sep, vpNetwork::receptor_list, vpNetwork::separator, vpRequest::size(), vpNetwork::verboseMode, and vpTRACE.

Referenced by vpNetwork::sendAndEncodeRequestTo(), and vpNetwork::sendRequest().

◆ sendTo()

template<typename T >
int vpNetwork::sendTo ( T *  object,
const unsigned int &  dest,
const unsigned int &  sizeOfObject = sizeof(T) 
)
inherited

Send an object. The size has to be specified.

Warning
Using this function means that, in the other side of the network, it knows what kind of object it is suppose to receive, and when it is suppose to receive. If the emitter has several receptors. It might be a problem, and in that case you better use the "request" option.
See also
vpNetwork::getReceptorIndex()
vpNetwork::send()
vpNetwork::sendRequest()
vpNetwork::sendRequestTo()
vpNetwork::sendAndEncodeRequest()
vpNetwork::sendAndEncodeRequestTo()
Parameters
object: Object to send.
dest: Index of the receptor that you are sending the object.
sizeOfObject: Size of the object.
Returns
The number of bytes sent, or -1 if an error happened.

Definition at line 482 of file vpNetwork.h.

References vpNetwork::receptor_list, vpNetwork::verboseMode, and vpTRACE.

◆ setMaxSizeReceivedMessage()

void vpNetwork::setMaxSizeReceivedMessage ( const unsigned int &  s)
inlineinherited

Change the maximum size that the emitter can receive (in request mode).

See also
vpNetwork::getMaxSizeReceivedMessage()
Parameters
s: new maximum size value.

Definition at line 226 of file vpNetwork.h.

◆ setNumberOfAttempts()

void vpClient::setNumberOfAttempts ( const unsigned int &  nb)
inline

Set the number of attempts to connect to the server.

See also
vpClient::getNumberOfAttempts()
Parameters
nb: Number of attempts.

Definition at line 210 of file vpClient.h.

◆ setTimeoutSec()

void vpNetwork::setTimeoutSec ( const long &  sec)
inlineinherited

Change the time the emitter spend to check if he receives a message from a receptor. Initially this value is set to 10usec.

See also
vpNetwork::setTimeoutUSec()
Parameters
sec: new value in second.

Definition at line 236 of file vpNetwork.h.

◆ setTimeoutUSec()

void vpNetwork::setTimeoutUSec ( const long &  usec)
inlineinherited

Change the time the emitter spend to check if he receives a message from a receptor. Initially this value is set to 10usec.

See also
vpNetwork::setTimeoutSec()
Parameters
usec: new value in micro second.

Definition at line 246 of file vpNetwork.h.

◆ setVerbose()

void vpNetwork::setVerbose ( const bool &  mode)
inlineinherited

Set the verbose mode.

Parameters
mode: Change the verbose mode. True to turn on, False to turn off.

Definition at line 253 of file vpNetwork.h.

◆ stop()

void vpClient::stop ( )

Stops the server and close the sockets.

Definition at line 152 of file vpClient.cpp.

References vpNetwork::receptor_list.

Referenced by ~vpClient().

Member Data Documentation

◆ beginning

std::string vpNetwork::beginning
protectedinherited

Definition at line 140 of file vpNetwork.h.

Referenced by vpNetwork::sendRequestTo().

◆ currentMessageReceived

std::string vpNetwork::currentMessageReceived
protectedinherited

Definition at line 144 of file vpNetwork.h.

◆ emitter

vpEmitter vpNetwork::emitter
protectedinherited

◆ end

std::string vpNetwork::end
protectedinherited

Definition at line 141 of file vpNetwork.h.

Referenced by vpNetwork::sendRequestTo().

◆ max_size_message

unsigned int vpNetwork::max_size_message
protectedinherited

Definition at line 138 of file vpNetwork.h.

◆ param_sep

std::string vpNetwork::param_sep
protectedinherited

Definition at line 142 of file vpNetwork.h.

Referenced by vpNetwork::sendRequestTo().

◆ readFileDescriptor

fd_set vpNetwork::readFileDescriptor
protectedinherited

◆ receptor_list

◆ request_list

◆ separator

std::string vpNetwork::separator
protectedinherited

Definition at line 139 of file vpNetwork.h.

Referenced by vpNetwork::sendRequestTo().

◆ socketMax

int vpNetwork::socketMax
protectedinherited

◆ tv

struct timeval vpNetwork::tv
protectedinherited

◆ tv_sec

long vpNetwork::tv_sec
protectedinherited

◆ tv_usec

long vpNetwork::tv_usec
protectedinherited

◆ verboseMode

bool vpNetwork::verboseMode
protectedinherited