Thread: Module: Winsock
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-03-2023 , 23:00   Re: Module: Winsock
Reply With Quote #7

On data arrival on one of your client connections, loop through all other client connections to send them the data.

I would use an array sized at the number of clients you need to support. Each slot of that array will hold the socket handle of an active client connection...on disconnect set it to 0. When you need to send data to all clients, loop through this array, sending data to all non-zero cells.
__________________
Bugsy is offline