I am using a TIdTcpServer component to implement a basic server side application. I have clients witch send strings to the server,ascii encoded, ending in these to characters #@.
eg :
this_is_a_sample#@ thisis_another_sample#@
My OnExecute method is the following :
procedure TLX8511.ProcessEvent(AContext: TIdContext);
var
recv : String;
begin
with AContext.Connection.IOHandler do
begin
CheckForDataOnSource(20);
if not InputBufferIsEmpty then
begin
recv := ReadLn('#@');
WriteLn(recv);
end;
end;
end
However when the ReadLn is executed I receive a wierd error : Buffer terminator must be specified
What I am doing wrong ?
LE : I am using Indy with lazarus on linux so this might be some porting issue
Thank you.