pisze chat zebym mogl sobie z kims tam gadac. korzystam z indy 9 (IdTCPClient i IdTCPServer) zrobilem klienta i serwer. w serwerze mam taka procedure:
procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
begin
Memo1.Lines.Add('>>'+AThread.Connection.LocalName+': '
+AThread.Connection.ReadLn);
AThread.Connection.WriteLn('?');
end;
i wszystko dziala dobrze. server odsyla mi '?' , ale jak dodam juz funkcje if np.
procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
begin
Memo1.Lines.Add('>>'+AThread.Connection.LocalName+': '
+AThread.Connection.ReadLn);
if AThread.Connection.ReadLn='asd' then AThread.Connection.WriteLn('asd')
else AThread.Connection.WriteLn('?');
end;
to jak wysylam wiadomosc do serwera to klient mi sie zawiesza :-/ .....ktos wie gdzie jest blad?[???]
dzieki