Both components are threaded if i recall (i still use Delphi 5, had Delphi 7 trial to playh with though)
In other words, they don't have events, linux does not have fd_read, fd_write fd_close, etc etc, when winsock encounters a message it sends the message to the application, your application reads the queue and gets fd_read, the function that deals with it then fires off the even FOnRecv(Self......) at which point your components tells you there's some data waiting.
Linux does not have this, so in order to keep compatability both the tcpclient and the indy don't support none blocking sockets, ie, you have to loop for the data.
Solution
---------
Delphi > Menu > Component > Install Packages
click on "Add"
C:\Program Files\Borland\Delphi7\Bin\
look for that and install it.
you will end up with a new internet component, ones' a server the other a client.
stick the Client on the form
ClientSocket1.Port:=666;
ClientSocket1.Host:='127.0
ClientSocket1.Active:=True
OnConnect..
procedure TForm1.ClientSocket1Connec
Socket: TCustomWinSocket);
begin
end;
procedure TForm1.ClientSocket1Read(S
Socket: TCustomWinSocket);
Var
S: String;
begin
S:=Socket.ReceiveText;
ShowMessage(S);
end;
Etc etc, it's the easiest component to use and will always be the easiest, i hate indy.
Main Topics
Browse All Topics





by: RickJPosted on 2006-04-06 at 18:17:16ID: 16397162
Look at the ICS components on this page,
me_index.h tml
http://www.overbyte.be/fra
I am fairly sure they will do what you want and are free!!