[Delphi / Pascal] Chat Room Part One - Server Side

preview_player
Показать описание
In this episode, we build the chat room server and fix the client so it works well, currently, the source code is not being posted as it is broken and I will need time to fix it before next weeks adding of encryption thanks for watching.

this project is a good project for kids who have some beginners knowledge.

Keep an eye on my blog for the source code to be posted.
Blog
Рекомендации по теме
Комментарии
Автор

Delphi and Indy Sockets, Very good tutorial man keep up the good work!


PS: dont use bindings .count its much more simple than that just use the lock list and loop through the contexts list no need to kill yourself over this its built into INDY by default.


Here use these:


Function for Sending to Single user connected to a TCP Server:
Procedure string; Datatosend: string);
var
List: TList;
Context: PersonInfo;
I: integer;
begin
List :=
try
for I := 0 to List.Count - 1 do
begin
Context := PersonInfo(List[I]);
if Context.Person_ID = PersonInfo then
begin
try

except
end;
Exit;
end;
end;
finally

end;
end;



And For sending to ALL users:


procedure string);
var
List: TList;
Index: integer;
begin
List :=

try

for Index := 0 to List.Count - 1 do
begin

with do
begin
WriteLn(Datatosend);
end;
end;

finally

end;
end;



YOUR WELCOME :) Keep up the good work.

BitmasterXor
Автор

Pasad del vídeo el muy inútil lo deja sin funcionar!

ELRPTOR
welcome to shbcf.ru