BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Use TTcpServer in Delphi 2006 to pass text from TClientSocke

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Nov 02, 2006 3:07 am    Post subject: Use TTcpServer in Delphi 2006 to pass text from TClientSocke Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.