Browse Source

Added a connection event when clients connect to the server.

Yuri 3 years ago
parent
commit
73529f5266
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/fcl-web/src/websocket/fpwebsocketserver.pp

+ 2 - 0
packages/fcl-web/src/websocket/fpwebsocketserver.pp

@@ -227,6 +227,8 @@ begin
     begin
     begin
     Connections.Add(Con);
     Connections.Add(Con);
     ConnectionHandler.HandleConnection(Con,True);
     ConnectionHandler.HandleConnection(Con,True);
+    if Assigned(OnConnect) then
+      OnConnect(Sender, Con);
     end;
     end;
 end;
 end;