Click here to Skip to main content
15,910,009 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IE Pin
candan30-Oct-02 20:14
professionalcandan30-Oct-02 20:14 
GeneralRe: IE Pin
Stephane Rodriguez.30-Oct-02 20:20
Stephane Rodriguez.30-Oct-02 20:20 
GeneralRe: IE Pin
candan30-Oct-02 21:43
professionalcandan30-Oct-02 21:43 
GeneralRe: IE Pin
Stephane Rodriguez.30-Oct-02 21:54
Stephane Rodriguez.30-Oct-02 21:54 
GeneralCListCtrl / CListBox and Icons Pin
JoeSox30-Oct-02 15:39
JoeSox30-Oct-02 15:39 
GeneralRe: CListCtrl / CListBox and Icons Pin
dabs31-Oct-02 4:24
dabs31-Oct-02 4:24 
GeneralRe: CListCtrl / CListBox and Icons Pin
JoeSox31-Oct-02 4:52
JoeSox31-Oct-02 4:52 
GeneralOverlapped I/O and Completion Port :: Winsock Pin
valikac30-Oct-02 12:18
valikac30-Oct-02 12:18 
Hi.

Okay. I am considering Overlapped I/O and Completion Port I/O models as more robust non-blocking I/O for a Winsock program. Currently I use WSAAsyncSelect. I have some essential questions about the two I/O model.

- Overlapped I/O

Okay. I understand Overlapped I/O with respect to both the event and completion routine. I believe that a primary reason that the completion routine solution of an Overlapped I/O model is more powerful that the event solution is simplicity. For example, the event solution is limited to 64 sockets per worker threads.

Under both solutions and especially the completion routine, how do you associate the socket that caused the overlapped I/O to call the completion routine? In other words, let say socketXYZ triggered overlapped I/O to call its completion routine function. How do you determine inside the routine function that is performing send, recv, etc. on socketXYZ?

- Completion Port I/O

This is really a powerful I/O model and is hands down the best I/O model under NT and newer versions of Windows. I have three essential questions.

1) Lets say there are exactly ten active sockets associated with a completion port. As each socket become inactive via user disconnect, error, etc., how do you know when there are no sockets (zero socket) associated with the completion port? In other words, if you wanted to close a completion port when no socket is associated with it, How do you know when there is no socket associate with it?

2) Given that the call to GetQueuedCompletionStatus() return FALSE (failed), How would you know what sockets to close during cleanup since the completion port had crashed?

-----

Under either Overlapped I/O or Completion Port I/O how do you know when to connect, send, receive, etc. data? For example, in WSAAsyncSelect and WSAAsynEvent, you can can AND check FD_SEND, FD_READ, etc. However, in Overlapped I/O or Completion Port I/O, how do you know if there is data available or when the host/client is ready for you to send data?

Thanks,
Kuphryn
GeneralRe: Overlapped I/O and Completion Port :: Winsock Pin
User 988530-Oct-02 12:46
User 988530-Oct-02 12:46 
GeneralRe: Overlapped I/O and Completion Port :: Winsock Pin
valikac30-Oct-02 14:08
valikac30-Oct-02 14:08 
GeneralRe: Overlapped I/O and Completion Port :: Winsock Pin
Gerald Schwab30-Oct-02 12:49
Gerald Schwab30-Oct-02 12:49 
GeneralGDI Objects question. Pin
Anonymous30-Oct-02 11:28
Anonymous30-Oct-02 11:28 
GeneralRe: GDI Objects question. Pin
Chris Richardson30-Oct-02 11:46
Chris Richardson30-Oct-02 11:46 
GeneralRe: GDI Objects question. Pin
Anonymous31-Oct-02 3:48
Anonymous31-Oct-02 3:48 
GeneralRe: GDI Objects question. Pin
Chris Richardson31-Oct-02 7:08
Chris Richardson31-Oct-02 7:08 
GeneralRe: GDI Objects question. Pin
Christian Graus30-Oct-02 11:53
protectorChristian Graus30-Oct-02 11:53 
GeneralDocView with tree info... Pin
Nick Jacobs30-Oct-02 11:22
Nick Jacobs30-Oct-02 11:22 
GeneralRe: DocView with tree info... Pin
Chris Richardson30-Oct-02 11:42
Chris Richardson30-Oct-02 11:42 
QuestionHow to load whole file to a CStringEx object ? Pin
ooosawaddee330-Oct-02 11:14
ooosawaddee330-Oct-02 11:14 
AnswerRe: How to load whole file to a CStringEx object ? Pin
Stephane Rodriguez.30-Oct-02 11:17
Stephane Rodriguez.30-Oct-02 11:17 
GeneralI need to detect a float Pin
ns30-Oct-02 11:09
ns30-Oct-02 11:09 
GeneralRe: I need to detect a float Pin
S van Leent30-Oct-02 11:13
S van Leent30-Oct-02 11:13 
GeneralRe: I need to detect a float Pin
alex.barylski30-Oct-02 11:13
alex.barylski30-Oct-02 11:13 
GeneralRe: I need to detect a float Pin
markkuk30-Oct-02 11:34
markkuk30-Oct-02 11:34 
GeneralRe: I need to detect a float Pin
alex.barylski30-Oct-02 14:39
alex.barylski30-Oct-02 14:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.