Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't close the application? #7

Open
tiger822 opened this issue May 21, 2024 · 0 comments
Open

Can't close the application? #7

tiger822 opened this issue May 21, 2024 · 0 comments

Comments

@tiger822
Copy link

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;
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant