Saturday, 01 October 2022
  2 Replies
  310 Visits
  Subscribe
Delphi 11
I have the following code to use the channels.

Client

procedure TForm9.WSClientConnect(Connection: TsgcWSConnection);
var
today : TDateTime;
begin
TsgcWSConnection(connection).DoSubscribe('mysql');
Circle1.Fill.Color := TAlphaColor(claGreen);
today := Now;
memoLog.Lines.insert(0,TimeToStr(today) + ' connected to mysql channel');

end;

Server

procedure TfrmServer_FMX.Button1Click(Sender: TObject);
begin
WSServer.Broadcast('ref Mysql','mysql'); // should broadcast just to the clients subscribed to 'mysql'
WSServer.Broadcast('not Mysql'); // broadcast to all
end;

I only see 'not Mysql'. ie the client docent seem to be subscribed to channel 'mysql'

What am I missing here please.