客户端用一段代码
DicomFind.FindSeries(),这句是从服务器取到图像的所有序列
服务器端流程
1.建立连接
protected override void OnReceiveAssociateRequest(DicomAssociate association)
{
VmFactory.CentreServerVM.MW.UpdateClient(this, association.Calling, "Associate");
VmFactory.CentreServerVM.MW.Log("ASSOCIATE-REQUEST", "Received from " + association.Calling);
if(BLLFactory.CliBLL.FindUser(PeerAddress,association.Calling))
{
SendAssociateReject(DicomAssociateRejectResultType.Permanent,
DicomAssociateRejectSourceType.User,
DicomAssociateRejectReasonType.Calling);
VmFactory.CentreServerVM.MW.Log("ASSOCIATE-REJECT", "Invalid calling AE Title: " + association.Calling);
}
else
{
server.DoAssociateRequest(this, association);
VmFactory.CentreServerVM.MW.EnableTimer(this, association.Calling, true);
VmFactory.CentreServerVM.MW.Log("ASSOCIATE-REQUEST", "Association accepted from " +
association.Calling + " (" + PeerAddress + ")");
}
}
2.服务器去取序列
3.关闭连接
protected override void OnReceiveReleaseRequest()
{
server.Clients.Remove(PeerAddress);
VmFactory.CentreServerVM.MW.RemoveClient(this);
SendReleaseResponse();
}
以上这些在正常情况下都没问题
现在就是频繁访问下出现问题,即在第一次连接还没关闭之前,想打开第二个连接,这时就会出现问题 |