@Override
    public void sendMessage(Message message) {
        try {
            if (ishost){
                objectWriter = new ObjectOutputStream(connectionSocket.getOutputStream());
            } else {
                objectWriter = new ObjectOutputStream(clientSocket.getOutputStream());
            }
            objectWriter.writeObject(message);
            objectWriter.flush();            
        }
        catch (Exception e){
            System.out.println("Exception: sendMessage " + e.getMessage());
        }                
    }