EIdConnClosedGracefully라는 에러인데
찾아보니까 정상종료에 대한 메세지라네요..
오늘 두번이나 질문 올리구 자답을 올리니.. 부끄럽슴돠 *^_^*
외발자전거 님이 쓰신 글 :
:
: 연결은 잘 돼는데 왜 클라이언트에서 접속을 끊으면
: IDE 상에서 에러가 납니다.
: 그냥 exe 파일을 실행시키면 에러가 나지 않습니다.
: 예외처리를 해 주어야 하나요?
:
:
:
: 서버 ==============================================
: procedure TForm1.IdCmdServerExecute(AThread: TIdPeerThread);
: var
: RcvText : string;
: begin
: while AThread.Connection.Connected do
: begin
: RcvText := AThread.Connection.ReadLn;
: if RcvText = '' then Exit;
:
: SetText(RcvText);
: end;
: end;
:
: 클라이언트 ========================================
: procedure TMainForm.BitBtn3Click(Sender: TObject);
: begin
: IdCmdClient.WriteLn('test2');
: end;
:
: procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
: begin
: if IdCmdClient.Connected then
: begin
: IdCmdClient.Disconnect;
: end;
: end;
|