void IMailTransceiver.Post(EMLetter letter) { CheckLogin(); letter.SetEnvelope(GetEnvelope()); this.AsyncRequest(StatusCode.Letter, letter, letter.GetTTL(this.Now)); }
EMLetter IMailTransceiver.Get(EMLetter letter) { letter.SetEnvelope(GetEnvelope()); var reply = Request(StatusCode.Letter, letter, letter.GetTTL(server.Now)); return(reply as EMLetter); }
EMLetter IMailTransceiver.Get(EMLetter letter) // dispatch the local letter to server { CheckLogin(); letter.SetEnvelope(GetEnvelope()); var reply = Request(StatusCode.Letter, letter, letter.GetTTL(this.Now)); if (reply.HasFlag(StatusCode.Denied)) { throw new EOCException((reply as EMText).Text); } return(reply as EMLetter); }
private EMLetter Pickup(EMLetter letter) { LetterContent feedback; try { feedback = receiver.Pickup(letter); } catch (Exception ex) // exception report { feedback = new LetterContent("error", ex.Message, TransmissionMode.Post); } if (feedback == null) { return(null); } var fbLetter = new EMLetter(letter.Sender, this.MailAdress, feedback, letter.GetTTL(this.Now)); fbLetter.SetEnvelope(new Envelope(letter.ID)); return(fbLetter); }
void IMailTransceiver.Post(EMLetter letter) { letter.SetEnvelope(GetEnvelope()); this.AsyncRequest(StatusCode.Letter, letter, letter.GetTTL(server.Now)); }