Firstly, thanks for great work.
I try to use websocket in my libriry, but i have no event.
constructor TMyClass.Create;
begin
FWebS := TWebSocket.Create;
FCtx := TSuperRttiContext.Create;
FWebS.OnMessage:=procedure(const msg: string)
var
obj, ret: ISuperObject;
begin
obj := SO(msg);
TrySOInvoke(FCtx, Self, 'ws_' + obj.S['action'], obj, ret);
end;
FWebS.Open('ws://echo.websocket.org');
procedure TMyClass.ws_echo(const value: string);
begin
ShowMessage(value);
end;
procedure TMyClass.SendMessage(msg: string);
begin
FWebS.Send(SO(['action', 'echo', 'value', msg]).AsString);
end;
When i send message from TMyClass.SendMessage, nothing happense.
Dephi 2010, Win7 x64
What's wrong in my code?
Original issue reported on code.google.com by ad...@simplit.info on 10 Nov 2014 at 11:33
Original issue reported on code.google.com by
ad...@simplit.info
on 10 Nov 2014 at 11:33