이 코드를 사용하여 데이터를 알립니다. 하지만 작동하지 않습니다. 도와 주실 수 있습니까?TServerSocket 및 TClientSocket
procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
var
i:integer;
sRec : string;
begin
for i := 0 to ServerSocket1.Socket.ActiveConnections-1 do
begin
with ServerSocket1.Socket.Connections[i] do
begin
sRec:=ReceiveText;
if sRec <> '' then
begin
if RemoteAddress='192.168.0.1' then
begin
if ReceiveText='1' then
Btn1.Color:=clNavy;
ADOQuery1.Active:=True;
end;
if RemoteAddress='192.168.0.1' then
begin
if ReceiveText='2' then
Btn1.Color:=clRed;
Pnl1.Visible:=True;
end;
end;
end;
end;
end;
무엇이 오류입니까? 데이터를 보내는 것은 무엇입니까? –
제발, 진짜로 의미가있는 것이 무엇인지 상세히 설명해주세요. – jachguate