The callback function triggered when the socket connects.
@protected void Function(WebSocket socket)? onConnect;