playerclient.h
209 void SetRequestTimeout(uint32_t seconds) { playerc_client_set_request_timeout(this->mClient,seconds); }
The PlayerClient is used for communicating with the player server.
Definition: playerclient.h:121
uint32_t GetOverflowCount()
Get count of the number of discarded messages on the server since the last call to this method.
std::string LookupName(int aCode) const
Get the name for a given interface code.
mutex_t mMutex
A mutex for handling synchronization.
Definition: playerclient.h:181
double GetRetryTime()
Get connection retry time, which is number of seconds to wait between reconnection attempts.
Definition: playerclient.h:227
std::string GetHostname() const
Returns the hostname.
Definition: playerclient.h:294
bool Peek(uint32_t timeout=0)
Check whether there is data waiting on the connection, blocking for up to timeout milliseconds (set t...
void SetReplaceRule(bool aReplace, int aType=-1, int aSubtype=-1, int aInterf=-1)
Set a replace rule for the clients queue on the server.
void SetDataMode(uint32_t aMode)
Set whether the client operates in Push/Pull modes.
PlayerClient(const std::string aHostname=PLAYER_HOSTNAME, uint32_t aPort=PLAYER_PORTNUM, int transport=PLAYERC_TRANSPORT_TCP)
Make a client and connect it as indicated.
int LookupCode(std::string aName) const
Get the interface code for a given name.
void SetRequestTimeout(uint32_t seconds)
Set the timeout for client requests.
Definition: playerclient.h:209
uint32_t GetPort() const
Returns the port.
Definition: playerclient.h:297
int GetRetryLimit()
Get connection retry limit, which is the number of times that we'll try to reconnect to the server af...
Definition: playerclient.h:219
void SetRetryLimit(int limit)
Set connection retry limit, which is the number of times that we'll try to reconnect to the server af...
Definition: playerclient.h:215
void RequestDeviceList()
Get the list of available device ids.
bool Connected()
Query connection to Player server.
Definition: playerclient.h:178
void SetRetryTime(double time)
Set connection retry time, which is number of seconds to wait between reconnection attempts.
Definition: playerclient.h:223
Definition: playerclient.h:96
Definition: playerclient.h:92
Definition: playerclient.h:86
T limit(T a, T min, T max)
Limit a value to the range of min, max.
Definition: utility.h:114
const int PLAYER_PORTNUM
The default port number for PlayerClient.
Definition: utility.h:61
const std::string PLAYER_HOSTNAME
The default hostname for PlayerClient.
Definition: utility.h:63
PLAYERC_EXPORT void playerc_client_set_retry_limit(playerc_client_t *client, int limit)
Set the connection retry limit.
PLAYERC_EXPORT void playerc_client_set_request_timeout(playerc_client_t *client, uint32_t seconds)
Set the timeout for client requests.
PLAYERC_EXPORT void playerc_client_set_retry_time(playerc_client_t *client, double time)
Set the connection retry sleep time.
int connected
Whether or not we're currently connected.
Definition: playerc.h:520
int retry_limit
How many times we'll try to reconnect after a socket error.
Definition: playerc.h:525
double retry_time
How long to sleep, in seconds, to sleep between reconnect attempts.
Definition: playerc.h:529