Skip to content

Can't close the application? #7

Open
@tiger822

Description

@tiger822

I modify the code to let the program quits when receipted 'quit' , but it's not working properly:
`
procedure TWebSocketDemo.Execute(AContext: TIdContext);
var
io: TWebSocketIOHandlerHelper;
msg: string;
begin
io := TWebSocketIOHandlerHelper(AContext.Connection.IOHandler);
io.CheckForDataOnSource(10);
msg := io.ReadString;
if msg='quit' then begin
Destroy;
exit;
end;
if msg = '' then
exit;

writeln(msg);

io.WriteString(msg);
end;
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions