List of all members.
Public Member Functions |
| chatclient (std::string server_ip, unsigned int port, bool automatic_discovery, std::string username) |
msg_type_t | get_message_type (char *buffer, size_t buf_len) |
Constructor & Destructor Documentation
chatclient::chatclient |
( |
std::string |
server_ip, |
|
|
unsigned int |
port, |
|
|
bool |
automatic_discovery, |
|
|
std::string |
username |
|
) |
| |
The contructor of the chatclient.
- Parameters:
-
server_ip | The ip of the server |
port | The port that the server waits for incoming connections. |
automatic_discovery | if true, the automatic server discovery is used to find out the server address and port. Also if this option is true server_ip and port parameters are ignored. |
username | the username with which the client is going to perform a login at the sevrer. |
Member Function Documentation
msg_type_t chatclient::get_message_type |
( |
char * |
buffer, |
|
|
size_t |
buf_len |
|
) |
| |
Function that finds the type of the received message.
- Parameters:
-
[in] | buffer | The buffer containing the data received from the server. |
[in] | buf_len | The length of the buffer. |
- Returns:
- the message type. If the type could NOT be found UKNOWN_MSG_TYPE should be returned.
The documentation for this class was generated from the following file: