sending WHY2_CHAT_CODE_PICK_USERNAME signal to client at connect
This commit is contained in:
parent
d25ca16f4e
commit
037521b871
@ -28,6 +28,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include <json-c/json.h>
|
#include <json-c/json.h>
|
||||||
|
|
||||||
|
#include <why2/chat/config.h>
|
||||||
#include <why2/chat/flags.h>
|
#include <why2/chat/flags.h>
|
||||||
#include <why2/llist.h>
|
#include <why2/llist.h>
|
||||||
#include <why2/memory.h>
|
#include <why2/memory.h>
|
||||||
@ -298,6 +299,9 @@ void *why2_communicate_thread(void *arg)
|
|||||||
why2_list_push(&connection_list, &node, sizeof(node)); //ADD TO LIST
|
why2_list_push(&connection_list, &node, sizeof(node)); //ADD TO LIST
|
||||||
printf("User connected.\t\t%d\n", connection);
|
printf("User connected.\t\t%d\n", connection);
|
||||||
|
|
||||||
|
//GET USERNAME //TODO: Use config
|
||||||
|
why2_send_socket(WHY2_CHAT_CODE_PICK_USERNAME, "server", connection);
|
||||||
|
|
||||||
void *buffer;
|
void *buffer;
|
||||||
char *received = NULL;
|
char *received = NULL;
|
||||||
char *raw = why2_strdup("");
|
char *raw = why2_strdup("");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user