public boolean deleteMessage(int number) throws IOException, ProtocolException { boolean result = false; Socket s = this.getIncommingSocket(); ReceiveProtocol protocol = this.getIncommingProtocol(s); protocol.startSession(); protocol.authorization(info.getUsername(), info.getPassword()); result = protocol.deleteMessage(number); protocol.closeSession(); s.close(); return result; }