Explorar o código

Added a connection event when clients connect to the server.

Yuri %!s(int64=3) %!d(string=hai) anos
pai
achega
73529f5266
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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
     Connections.Add(Con);
     ConnectionHandler.HandleConnection(Con,True);
+    if Assigned(OnConnect) then
+      OnConnect(Sender, Con);
     end;
 end;