Basically i found a problem, i didin't check it out but it seems its already there.
listen() function holds up the thread in which is executed, so how i am supposed to receive any commands, it listens then when client connects, i do what, do i need to create a thread that calls listen() and awaits for clients, then i add newly connected client to a client list (in my server class), and call listen() again to check whenever another clients awaits connection? so i manage receiving packets from another spawned thread? is that correct?