Shadow Network Framework
0.0.1-alpha
C Server Library for Shadow Network Framework
|
This file Defines everything related to handling Clients. More...
Go to the source code of this file.
Data Structures | |
struct | SNF_Client_t |
The structure for each saved client. More... | |
Typedefs | |
typedef struct SNF_Client_t | SNF_CLT |
Shortened definiton of struct SNF_Client_t . | |
Functions | |
void | snf_clt_init (int ht_min_Size) |
Initialises the HashTable that saves the clients. | |
SNF_CLT * | snf_clt_new (int Sockfd) |
Creates (and allocates) a new Client using their Sockfd, with a default SNF_CLT::UUID with the value of "00000000-0000-0000-0000-000000000000". | |
void | snf_clt_free (SNF_CLT *Client) |
Frees the allocated SNF_CLT. | |
SNF_CLT * | snf_clt_get_sockfd (int Sockfd) |
Searches for a SNF_CLT depending on their SNF_CLT::sock. | |
SNF_CLT * | snf_clt_get_uuid (const char *uuid) |
Searches for a SNF_CLT depending on their SNF_CLT::UUID. | |
int | snf_clt_check_sockfd (int Sockfd) |
Checks the existance of a SNF_CLT depending on their SNF_CLT::sock. | |
int | snf_clt_check_uuid (const char *uuid) |
Checks the existance of a SNF_CLT depending on their SNF_CLT::UUID. | |
void * | snf_clt_handle_new (void *arg) |
Handles new incoming Clients. | |
void * | snf_clt_handle (void *arg) |
Handles existing Clients. | |
void | snf_clt_connect (SNF_CLT *Client) |
Function to be called upon Client Connection. | |
void | snf_clt_reconnect (SNF_CLT *Client) |
Function to be called upon Client Re-Connection. | |
void | snf_clt_disconnect (SNF_CLT *Client) |
Function to be called upon Client Disconnection. | |
This file Defines everything related to handling Clients.
typedef struct SNF_Client_t SNF_CLT |
Shortened definiton of struct SNF_Client_t .
|
extern |
Initialises the HashTable that saves the clients.
ht_min_Size | The HashTable's length ( See note ) |
|
extern |
Creates (and allocates) a new Client using their Sockfd, with a default SNF_CLT::UUID with the value of "00000000-0000-0000-0000-000000000000".
Sockfd | The Client's SNF_CLT::sock ( Client's Socket Discriptor ) |
|
extern |
Frees the allocated SNF_CLT.
Client | The SNF_CLT instance to be free'd. |
|
extern |
Searches for a SNF_CLT depending on their SNF_CLT::sock.
Sockfd | The socket descriptor to search with |
|
extern |
Searches for a SNF_CLT depending on their SNF_CLT::UUID.
uuid | The socket descriptor to search with |
|
extern |
Checks the existance of a SNF_CLT depending on their SNF_CLT::sock.
Sockfd | The socket descriptor to search with |
|
extern |
Checks the existance of a SNF_CLT depending on their SNF_CLT::UUID.
uuid | The socket descriptor to search with |
|
extern |
Handles new incoming Clients.
arg | new Clitent's address ( SNF_CLT pointer) |
|
extern |
Handles existing Clients.
arg | new Clitent's address ( SNF_CLT pointer) |
|
extern |
Function to be called upon Client Connection.
Client | Connecting Client( SNF_CLT pointer) |
|
extern |
Function to be called upon Client Re-Connection.
Client | Re-Connecting Client |
|
extern |
Function to be called upon Client Disconnection.
Client | Disconnecting Client. |