@Override
    public void run(){
        try{
            if(!window.IsFull()){
                socket.setName(recvStringMsg());
                window.socket.getLast().setName(socket.getName());
                window.sendStringMsg(socket.getName()+" entrou na sala...", window);
                while(socket.getSocket().isConnected()){
                    user = recvStringMsg();
                    msg = recvStringMsg();
                    if(user.equals("@logout")){
                        window.sendStringMsg(msg+" Saiu da sala... ", window);
                        window.deleteSocket(window, msg);
                        this.interrupt();
                    }
                    else{
                        if(!window.searchUserInList(user, window)){
                            window.sendStringMsg(socket.getName()+" disse para <TODOS>: "+msg, window);
                        }
                        else{
                            window.sendString(socket.getName()+" disse para <"+user+">: " +msg, window, user);
                        }
                    }
                }
            }
        }catch(Exception e){
            this.interrupt();
        }
    }