As a student i am very busy with my studies, so no time for PB

Anyhow i have few intresting courses and one of them is Java Programming.
In our last project we need to create a client application and a server application.
The purpose of this project is to create a game server, where clients can conect and play against each other.
I am having issues about the programming of the server and i wanted advice from those who may experienced these issues before.
When a client connects the server he has the option to open a new room with some specifications for example max num players - until the room is not full the game will not begin OR join an existing room.
Thing is that each client that connects a thread is being launched.
my problem is to make communication with the threads to the ROOM itself.
I have two options in my mind:
- Lets say a client connects and creates a room.
A second client connects and wishes to join the room previously created by the client above.
I can assign the socketID of the client who wish to join the room to the ROOM properties (which will have now 2 sockets, the one who created the room and the on who joined) and kill the join user thread
since the thread of the user who created the room will handle them both.
in this option the thread of the user who created the room will manage all sockets but it is a problem since maybe the user who created the room can disconnect or there will be a slow down with other clients who are not responding and it will make the whole room lag.
- 2nd option is to leave each user on his own thread and assign them to ROOM where the room will communicate with each thread where if it needs to send data or receive data, here there is no dependency of the ROOM manager in the sockets, the threads manage them and if someone disconnect no matter who i don't have a problem.
But i just don't know if this is a good idea that the ROOM and sockets withh communicate through checks of boolean checks (of new input or output needed to be sended by the rooms) and buffer managing.
What do you guys think?
thanks.