How do I get the message from any pacs server Delphi and display this message ASCII format in memo1
is it possible to use could this indy component.
This is an example code from http://sourceforge.net/projects/indy10clieservr/
Send C-ECHO Command from any Modality Emulator or Any PACS Server. Connected Ok but cant see incoming message in memo1. But Chamelon HL7 component display to message on Delphi
procedure TServerMainForm.IdTCPServerConnect(AContext: TIdContext);
begin
memo1.Lines.Add('Connection from ..PeerIP/IP' + AContext.Binding.PeerIP + ' // ' + AContext.Binding.IP + ' @ ' + dateToStr(now) + '->' + TimeToStr(now) );
AContext.Connection.IOHandler.WriteLn('C-ECHO-RSP');
end;
procedure TServerMainForm.IdTCPServerExecute(AContext: TIdContext);
var CommBlock, NewCommBlock : TINDYCMD;
buf : TIdBytes;
line : String;
i : integer;
begin
memo1.Lines.Add('server execute start' );
with AContext.Connection do
begin
IOHandler.Readln(line);
end;
try
////////////// This line = 0 and cant see anything memo1. ////////////
if length(line) > 0 then
begin
memo1.Lines.Add(line );
i:= strToInt(Line);
end
else
i:=-1;
except
end;
case i of
0: begin
TCPServerExecuteExchangeStrings(AContext);
end;
1 : begin
TCPServerExecuteExchangeRecords(AContext);
end;
2: begin
end;
else
//
end;
LEDShape.brush.Color := clgreen;
memo1.Lines.Add('server execute done' );
end;