Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Porting old Delphi2007 application using TServerSocket....
#9
Thanks, I think that does it for me!
And there are never many clients connected, normally 0 or 1 but I have set a max of 2 clients.

Now I must rip out the old code and insert the new IdTCP server in its place...

But one clarification concerning the OnExecute handler:

If readln timeouts will it return an empty string to msg? I.e. it will leave the data in the buffer until the line ending char arrives?
I don't want to have partial packets to deal with...
Code:
msg := AContext.Connection.IOHandler.ReadLn(ETX, 10); //Timeout 10 ms

I guess it must work that way because otherwise one can never know if a partial packet is present when processing it (the ETX char is "eaten" by ReadLn)...
Reply


Messages In This Thread
RE: Porting old Delphi2007 application using TServerSocket.... - by BosseB - 07-08-2020, 07:43 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)