Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[7931] [질문] 인디 TCP 서버, 클라이언트
외발자전거 [sonkd] 643 읽음    2002-01-28 17:47

연결은 잘 돼는데 왜 클라이언트에서 접속을 끊으면
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;

+ -

관련 글 리스트
7931 [질문] 인디 TCP 서버, 클라이언트 외발자전거 643 2002/01/28
7932     [자답] 인디 TCP 서버, 클라이언트 *^_^* 외발자전거 991 2002/01/28
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.