You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
`
The text was updated successfully, but these errors were encountered:
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;
`
The text was updated successfully, but these errors were encountered: