Public Member Functions | |
QApolloSocketClient () | |
default constructor | |
QApolloSocketClient (const std::string &address, const std::string &port) | |
constructor with address and port | |
virtual | ~QApolloSocketClient () |
destructor | |
bool | Write (const std::string &Cmd) |
wrtite cmd to server | |
std::string | Read () const |
read server response as a string | |
const std::string & | GetServerPort () const |
const std::string & | GetServerAddress () const |
void | SetServerPort (const std::string &s) |
void | SetServerAddress (const std::string &s) |
int | Open () |
open socket connection | |
bool | Close () |
close socket connection | |
Protected Attributes | |
int | socketDescr |
Private Member Functions | |
int | ReadLine (char *data, int max_len) const |
read line as resoponse from server | |
bool | Write (const char *buffer, int len) |
write buffer to socket | |
Private Attributes | |
std::string | fServerAddress |
std::string | fServerPort |
int QApolloSocketClient::Open | ( | ) |
open socket connection
References Close(), fServerAddress, and fServerPort.
Referenced by QBaseClient::ExecCommand().
int QApolloSocketClient::ReadLine | ( | char * | data, | |
int | max_len | |||
) | const [private] |
read line as resoponse from server
data | buffer filled with server response | |
max_len | max buffer size |
Referenced by Read().
bool QApolloSocketClient::Write | ( | const char * | buffer, | |
int | len | |||
) | [private] |
write buffer to socket
std::string QApolloSocketClient::fServerAddress [private] |
server address
Referenced by Open().
std::string QApolloSocketClient::fServerPort [private] |
server port
Referenced by Open().