protected void listen() {
            String messageReceived;
            while (core.isOn()) {
                try {
                    if ((messageReceived = input.readLine()) != null)//reads message
                        System.out.println(messageReceived);
                        core.recibirSocket(messageReceived);
                } catch (IOException e) {
                    e.printStackTrace();
                }

            }
        }