package socketclients import ( "clickandjoin.app/websocketserver/modules/cache" "clickandjoin.app/websocketserver/modules/structs" ) func BroadcastMessage(sendSocketMessage structs.SendSocketMessage) { for _, client := range cache.SocketClients { client.SendMessage(sendSocketMessage) } } func IsReceiverConnectedToThisServer(recId string) (isConnected bool, socketClient *structs.SocketClient) { for id, client := range cache.SocketClients { if id == recId { return true, client } } return false, socketClient }