|
C++ 빌더 입문한지..얼마되지않아 고생중입니다...
PC에서 외부 장비와 접속하는 Client프로그램을 개발해야하는데
하나의 프로그램에서 4개의 ClientSocket을 이용하여 동시접속해야하는데 ...
이게 되다 안되다 그러네요 ...
void __fastcall TForm_NWC3000::CH1ConnectClick(TObject *Sender)
{
ClientSocket1->Address = IP_Address1->Text;
ClientSocket1->Port = atoi(PORT1->Text.c_str());
ClientSocket1->Active = true;
tflag.tcpflag1 = TCPACTIVE;
}
//---------------------------------------------------------------------------
void __fastcall TForm_NWC3000::CH1DisClick(TObject *Sender)
{
ClientSocket1->Active = false;
}
//---------------------------------------------------------------------------
void __fastcall TForm_NWC3000::CH2ConnectClick(TObject *Sender)
{
ClientSocket2->Address = IP_Address2->Text;
ClientSocket2->Port = atoi(PORT2->Text.c_str());
ClientSocket2->Active = true;
}
//---------------------------------------------------------------------------
void __fastcall TForm_NWC3000::CH2DisClick(TObject *Sender)
{
ClientSocket2->Active = false;
}
일단 2개만 접속을 시도했는데 오류가 뜨다 안뜨다 ...그래요 ..접속도 잘 안되고요
ClientSocket1은 접속이 잘 되는데 2 는 접속이 잘안됩니다 ㅜㅜ
아이피번호랑 포트번호 다 다르게해도 잘 안되요 도움부탁드립니다 ..
|