 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu Nov 02, 2006 3:07 am Post subject: Use TTcpServer in Delphi 2006 to pass text from TClientSocke |
|
|
There is an existing executable that uses TClientSocket in C++ Builder
6 to pass text to a Delphi 5 application using TServerSocket. We are
in the process of upgrading from Delphi 5 to Delphi 2006. There is an
issue with upgrading the code from C++Builder 6 to C++Builder
2006(Different post made). One option is to leave the code in C++
Builder 6. The Delphi 5 needs to be upgraded to Delphi 2006.
TServerSocket was replaced with TTcpServer having similiar properties.
Delphi 5 code that passes the text
procedure TForm.ServerSocketClientRead(Sender: TObject; Socket:
TCustomWinSocket);
begin
ServerSocketClientRead_UtteranceString(Socket.ReceiveText,TRUE) ;
end;
procedure TOverF.ServerSocketAccept(Sender: TObject; Socket:
TCustomWinSocket);
begin
bActiveConnection := TRUE ; // global variable
end;
Similiar Delphi 2006 code would be
procedure TForm.TcpServerGetThread(Sender: TObject;
var ClientSocketThread: TClientSocketThread);
begin
TcpServerClientRead_UtteranceString(ClientSocketThread.ClientSocket.Receiveln,TRUE)
;
end;
procedure TForm.TcpServerAccept(Sender: TObject; ClientSocket:
TCustomIpClient);
begin
bActiveConnection := TRUE ; // global variable
end; |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|