Set a ioCompletion routine
Is there any way to send a parameter to an ioCompletion routine for the device manager? I have multiple TCP streams, more than one of which may be opening simultaneously, and I would like the completion procedure to know which one opened. If a parameter can't be passed, can someone suggest an alternate way of accomplishing this?
Well, here's what you _could_ do. Keep an array or linked list of the TCP ref numbers for the streams you are opening. I'd probably use a linked list and then store more about it then just the refnumber (so as not to waste the list) and so that it was entirely flexible. Then, have one ioCompletion routine where the first lines of code looped through the available TCP streams and checked to see if they were open (by using the TCP status routines). I'd probably have a field that was the TCP connection's state _before_ the current check that way you can tell if a connection had just been finished.