Indy 9 Program
void__fastcall TfrmMain::ServerConnect (TIdPeerThread*AThread)
{
-----------------------------------------------------------
TIdTCPServerConnection* con=AThread->Connection;
-----------------------------------------------------------
intiExpectedLen=0, iStackBufSize=0;
-----------------------------------------------------------
iStackBufSize=con->ReadFromStack(true, 5000, true);
-----------------------------------------------------------
}
I'd like to move this program to Indy10, but I can't find ReadFromStack when I search for keywords in Indy10's manual. Do you have any equivalent features?
delphi
There's an article like this:
Upgrade Indy9 to Indy10
Questions
I want to upgrade my application from Indy 9 to 10 with Delphi 2007. There is a lot of issues in this, I have read the indie doc about changes but I still need advice. This won't compile as ReadString is not found.
vCmdHead:=FTCPCclient.ReadString(16);
where FTCPCClient is of type TIdTCPCClient.vCmdHead is a structure that contains a command as a string. What method could I use installed?
Answer
{$IFDEFINDY10}
ALine: =IdTCPCClient.IOHandler.ReadString(16);
{$ELSE}
Aline: = IdTCPCClient.ReadString(16);
{$ENDIF}
Something like this
Other articles like this:
Upgrading Delphi 7 Indy 9 app to Indy 10(II)
It seems that this is the case in that analogy.
TidIOHandlerStack Class
TidIOHandlerStack Members
TidIOHandler.ReadBytes Method
TIdTCPConnection Class
TIdTCPConnection Members
TIdTCPConnection.CreateIOHandler Method
TIdTCPConnection.IOHandler Property
TIdTCPConnection.ManagedIOHandler Property
Find out if it's actually related or how to use it.
Read the article for Indy9's affected methods here.
TIdTCPConnection.ReadFromStack
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.