I have written a socket server and client application that manages 22
different sockets at any given time. Each socket is using the same server
address but has a different channel. Two sockets have their own dedicated
pointers and then there are 20 data sockets that I open on the heap with the
same pointer name. To keep track of those 20 data pointers I am trying to use
a CPtrArray to hold them. I don't get any compile or run-time errors, but the array
is not being loaded with the socket pointers.
pDataClient = new CDataSocket;
This does not work. I looked at the example in ChatSrvr
on MSDN and it uses a CPtrList. I need to be able to access
the pointers by index not sequentially. What am I doing wrong?
Is there a better way?
Help -- jr