   IOCP Server Send to all clients
  Dear All:Is it possible to send data to all connected clients using a IOCP server?I'm using IOCPNet server:http://www.codeproject.com/KB/IP/IOCPNet.aspxRegards.Alfredo Mendiola LoyolaLima, Perú   
  Yes and no.IOCP does not do that automatically, it merely informs you when something happens (a new client connects or reading data from socket is done, for example).But sure, if you keep a list of all connected clients, nothing prevents you from iterating over them and sending the same data out to each.   ;Quote:Original post by samothYes and no.IOCP does not do that automatically, it merely informs you when something happens (a new client connects or reading data from socket is done, for example).But sure, if you keep a list of all connected clients, nothing prevents you from iterating over them and sending the same data out to each.How can I know what clients are connected to the IOCP server?ThanksAlfredo Mendiola LoyolaLima, Perú;  When you accept (or WSAAccept, or whatever), the function returns a socket handle. The original socket remains listening, and the one you got back is connected to exactly one other host. You save that in a list or vector, or any other way you want. You can use these sockets to send data to other hosts or to get information about the addresses etc.This is independent of whether or not you use an IOCP, you could call that the "basics of server programming". You might want to google for "Beej network guide" for a very decent introduction to the concepts of socket programming. Winsock is a bit different, and some functions are called differenly, but the all basic concepts are exactly the same (for example poll is the same principle as IOCP, only less advanced).   ;Quote:Original post by samothWhen you accept (or WSAAccept, or whatever), the function returns a socket handle. The original socket remains listening, and the one you got back is connected to exactly one other host. You save that in a list or vector, or any other way you want. You can use these sockets to send data to other hosts or to get information about the addresses etc.This is independent of whether or not you use an IOCP, you could call that the "basics of server programming". You might want to google for "Beej network guide" for a very decent introduction to the concepts of socket programming. Winsock is a bit different, and some functions are called differenly, but the all basic concepts are exactly the same (for example poll is the same principle as IOCP, only less advanced).Thank you i could include the sockes insede a stl vector using multithreaded socket server.I could'nt finf the accept() methos in th icopnet code :-(.I will have to use the multithreaded insock server.Thanks.Alfredo Mendiola LoyolaLima, Perú