added plain why2_listen_authority fn

This commit is contained in:
Václav Šmejkal 2025-02-01 13:41:59 +01:00
parent 22bf36481a
commit c10677c29c
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 11 additions and 0 deletions

View File

@ -43,6 +43,7 @@ void *why2_accept_thread(void *params); //LOOP ACCEPTING CONNECTIONS
void why2_clean_connections(void); //CLOSE EVERY CONNECTION void why2_clean_connections(void); //CLOSE EVERY CONNECTION
void why2_clean_threads(void); //CLOSE EVERY RUNNING MESSAGE THREAD void why2_clean_threads(void); //CLOSE EVERY RUNNING MESSAGE THREAD
void *why2_listen_server(void *socket); //LISTEN FOR OTHER's USERS MESSAGES void *why2_listen_server(void *socket); //LISTEN FOR OTHER's USERS MESSAGES
void *why2_listen_authority(void *socket); //LISTEN TO AUTHORITY
void *why2_getline_thread(WHY2_UNUSED void* arg); //START getline IN SEPARATE THREAD void *why2_getline_thread(WHY2_UNUSED void* arg); //START getline IN SEPARATE THREAD
void why2_trim_string(char **s); //REMOVES SPACES FROM END AND START OF *s void why2_trim_string(char **s); //REMOVES SPACES FROM END AND START OF *s

View File

@ -1147,6 +1147,16 @@ void *why2_listen_server(void *socket)
return NULL; return NULL;
} }
void *why2_listen_authority(void *socket)
{
int socket_ptr = *(int*) socket;
for (;;)
{
read_socket_raw(socket_ptr);
}
}
void *why2_getline_thread(WHY2_UNUSED void* arg) void *why2_getline_thread(WHY2_UNUSED void* arg)
{ {
getline_thread = pthread_self(); getline_thread = pthread_self();