public void Write(AAssociateAC ac) { FireWrite(ac); try { lock( stream ) { state.Write(ac); } } catch (IOException ioe) { if (assocListener != null) assocListener.Error(assoc, ioe); throw ioe; } this.ac = ac; }
internal virtual void Write(AAssociateAC ac) { throw new SystemException(); }
internal override void Write(AAssociateAC ac) { try { ac.WriteTo(m_fsm.stream); } catch (IOException e) { m_fsm.ChangeState(m_fsm.STA1); throw e; } m_fsm.ChangeState(m_fsm.STA6); }
private void NegotiateRoleSelection(AAssociateRQ rq, AAssociateAC ac) { for ( IEnumerator enu= rq.ListRoleSelections().GetEnumerator(); enu.MoveNext(); ) ac.AddRoleSelection(NegotiateRoleSelection((RoleSelection) enu.Current)); }
private void NegotiatePresCtx(AAssociateRQ rq, AAssociateAC ac) { for ( IEnumerator enu= rq.ListPresContext().GetEnumerator(); enu.MoveNext(); ) ac.AddPresContext(NegotiatePresCtx((PresContext) enu.Current)); }
private void NegotiateExt(AAssociateRQ rq, AAssociateAC ac) { for ( IEnumerator enu= rq.ListExtNegotiations().GetEnumerator(); enu.MoveNext(); ) { ExtNegotiation offered = (ExtNegotiation) enu.Current; String uid = offered.SOPClassUID; ExtNegotiatorI enp = GetExtNegPolicy(uid); if (enp != null) ac.AddExtNegotiation(new ExtNegotiation(uid, enp.Negotiate(offered.info()))); } }
private PduI doNegotiate(AAssociateRQ rq) { String appCtx = NegotiateAppCtx(rq.ApplicationContext); if (appCtx == null) { return new AAssociateRJ(AAssociateRJ.REJECTED_PERMANENT, AAssociateRJ.SERVICE_USER, AAssociateRJ.APPLICATION_CONTEXT_NAME_NOT_SUPPORTED); } AAssociateAC ac = new AAssociateAC(); ac.ApplicationContext = appCtx; ac.CalledAET = rq.CalledAET; ac.CallingAET = rq.CallingAET; ac.MaxPduLength = this.maxLength; ac.ClassUID = this.ClassUID; ac.VersionName = this.Vers; ac.AsyncOpsWindow = NegotiateAOW(rq.AsyncOpsWindow); NegotiatePresCtx(rq, ac); NegotiateRoleSelection(rq, ac); NegotiateExt(rq, ac); return ac; }