示例#1
0
  public Letter getLetter(int number) throws IOException, ProtocolException {
    Letter l;
    Socket s = this.getIncommingSocket();
    ReceiveProtocol protocol = this.getIncommingProtocol(s);

    protocol.startSession();
    protocol.authorization(info.getUsername(), info.getPassword());
    l = protocol.openMessage(number);
    protocol.closeSession();
    s.close();
    return l;
  }