How to make the WebSocketServer server discount a specific user/client?

Stopping the server should close all active connections automatically. The client won't be notified because that's how a TCP connection works and WebSocket is based on TCP.

I'm not sure I understand the situation fully. What do you mean by putting the OnDisconnect event in the OnDisconnect event?
A sample or exact steps to reproduce would help to understand this.

Because FNC components are all visual controls which cannot be dropped onto a data module. However, you can still create them programmatically. See here: