Click here to Skip to main content
15,913,159 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: size of file Pin
CPallini9-Dec-08 8:36
mveCPallini9-Dec-08 8:36 
GeneralRe: size of file Pin
Perspx9-Dec-08 9:38
Perspx9-Dec-08 9:38 
GeneralRe: size of file Pin
CPallini9-Dec-08 9:41
mveCPallini9-Dec-08 9:41 
GeneralRe: size of file Pin
Perspx9-Dec-08 9:45
Perspx9-Dec-08 9:45 
QuestionInterprocess comunication using overlapped named pipes Pin
ForNow9-Dec-08 7:07
ForNow9-Dec-08 7:07 
AnswerRe: Interprocess comunication using overlapped named pipes Pin
led mike9-Dec-08 7:15
led mike9-Dec-08 7:15 
GeneralRe: Interprocess comunication using overlapped named pipes Pin
ForNow9-Dec-08 14:22
ForNow9-Dec-08 14:22 
GeneralRe: Interprocess comunication using overlapped named pipes Pin
Mark Salsbery9-Dec-08 15:03
Mark Salsbery9-Dec-08 15:03 
ForNow wrote:
making this a async./overlapped connection


It's not the connection that is asynchronous/overlapped....
it's individual I/O operations that can be executed asynchronously/overlapped.

The client end knows nothing about your server's overlapped operations
and vice versa.

When you do an overlapped I/O operation, you're essentially just queuing the operation
for completion asynchronously relative to the thread starting the operation.

When your server does an overlapped ConnectNamedPipe(), the event you pass in
your overlapped struct is used to signal the completion of that operation only, which
is when a client connects with CreateFile() or CallNamedPipe(). The system will
signal the event.

The server then could then call ReadFile() overlapped/asynchronously to read data
from the client, in which case you could use the event to know when the read operation
is complete. Again, the system signals the event.

An overlapped structure holds a context for each operation (and anything else you
want to put in there).
How you manage the overlapped structs and their lifetime is up to you. The system just passes
them around (e.g. you get the same LPOVERLAPPED back in GetOverlappedResult()).

Make sense? There's nothing about any of this requiring an endpoint to have the other
end's event handles or overlapped structs. The client could use synchronous I/O while
the server uses asynchronous I/O, or whatever combination you want.

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Interprocess comunication using overlapped named pipes Pin
ForNow9-Dec-08 16:00
ForNow9-Dec-08 16:00 
GeneralRe: Interprocess comunication using overlapped named pipes Pin
Mark Salsbery9-Dec-08 17:04
Mark Salsbery9-Dec-08 17:04 
GeneralRe: Interprocess comunication using overlapped named pipes Pin
ForNow9-Dec-08 17:12
ForNow9-Dec-08 17:12 
GeneralRe: Interprocess comunication using overlapped named pipes Pin
Mark Salsbery9-Dec-08 17:24
Mark Salsbery9-Dec-08 17:24 
AnswerRe: Interprocess comunication using overlapped named pipes Pin
Mark Salsbery9-Dec-08 8:49
Mark Salsbery9-Dec-08 8:49 
Question__VAR_ARGS__ Pin
Like2Byte9-Dec-08 6:07
Like2Byte9-Dec-08 6:07 
GeneralRe: __VAR_ARGS__ Pin
Luc Pattyn9-Dec-08 6:26
sitebuilderLuc Pattyn9-Dec-08 6:26 
GeneralRe: __VAR_ARGS__ Pin
Like2Byte9-Dec-08 6:38
Like2Byte9-Dec-08 6:38 
GeneralRe: __VAR_ARGS__ Pin
Luc Pattyn9-Dec-08 6:43
sitebuilderLuc Pattyn9-Dec-08 6:43 
GeneralRe: __VAR_ARGS__ Pin
Like2Byte9-Dec-08 6:48
Like2Byte9-Dec-08 6:48 
GeneralRe: __VAR_ARGS__ Pin
Like2Byte9-Dec-08 6:45
Like2Byte9-Dec-08 6:45 
GeneralRe: __VAR_ARGS__ [modified] Pin
Luc Pattyn9-Dec-08 7:00
sitebuilderLuc Pattyn9-Dec-08 7:00 
GeneralRe: __VAR_ARGS__ Pin
Like2Byte9-Dec-08 7:18
Like2Byte9-Dec-08 7:18 
AnswerRe: __VAR_ARGS__ Pin
Stuart Dootson9-Dec-08 9:34
professionalStuart Dootson9-Dec-08 9:34 
Questiontext wrapping for a clistctrl Pin
kitkat120129-Dec-08 5:34
kitkat120129-Dec-08 5:34 
QuestionRe: text wrapping for a clistctrl Pin
led mike9-Dec-08 5:40
led mike9-Dec-08 5:40 
AnswerRe: text wrapping for a clistctrl Pin
kitkat120129-Dec-08 5:54
kitkat120129-Dec-08 5:54 

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.