아래와 같이 코딩을 했는데
<< 에러발생 >>
{========================================================}
" Project Project1.exe raised exception class ESocketError with message
'Asynchronous socket error 10061'.
Process stopped. Use Step or Run to Continue."
이렇게 에러가 나네요...
뭐가 문제인지 모르겠어요.. 좀가르쳐 주세요.. ^^
<< 코딩부분 >>
{========================================================}
procedure TForm1.SendBtnClick(Sender: TObject);
begin
ClientSocket1.Host := OtherComputerIP; // Client IP : 321.321.321.321
ServerSocket1.Active := True; // Server IP : 123.123.123.123
ClientSocket1.Active := True;
end;
procedure TForm1.SendBtnClick(Sender: TObject);
begin
ClientSocket1.Socket.SendText(Edit1.Text);
end;
procedure TForm1.ClientSocket1Read(Sender: TObject;
Socket: TCustomWinSocket);
begin
Memo1.Lines.Add(Socket.ReceiveText);
end;
procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
begin
Socket.SendText(Socket.ReceiveText);
end;
즉 ServerSocket이 Open되어 있지 않은 상황입니다.
OtherComputerIP 컴퓨터에 ServerSocket이 열려 있는지,
열려 있다면 Port번호는 제대로 설정되어 있는지 확인하시기 바랍니다.
프리맨 wrote:
> 아래와 같이 코딩을 했는데
>
> << 에러발생 >>
> {========================================================}
> " Project Project1.exe raised exception class ESocketError with message
> 'Asynchronous socket error 10061'.
> Process stopped. Use Step or Run to Continue."
>
> 이렇게 에러가 나네요...
> 뭐가 문제인지 모르겠어요.. 좀가르쳐 주세요.. ^^
>
>
> << 코딩부분 >>
> {========================================================}
> procedure TForm1.SendBtnClick(Sender: TObject);
> begin
> ClientSocket1.Host := OtherComputerIP; // Client IP : 321.321.321.321
> ServerSocket1.Active := True; // Server IP : 123.123.123.123
> ClientSocket1.Active := True;
> end;
>
> procedure TForm1.SendBtnClick(Sender: TObject);
> begin
> ClientSocket1.Socket.SendText(Edit1.Text);
> end;
>
> procedure TForm1.ClientSocket1Read(Sender: TObject;
> Socket: TCustomWinSocket);
> begin
> Memo1.Lines.Add(Socket.ReceiveText);
> end;
>
> procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
> Socket: TCustomWinSocket);
> begin
> Socket.SendText(Socket.ReceiveText);
> end;
>
>