are socket handles always usabele by file i/o functions?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: qfel (RemIt.q_tmp_at_aster.pl)
Date: 10/31/04


Date: Sun, 31 Oct 2004 11:41:48 +0100


"Winsock SPI clients may take advantage of providers whose socket
descriptors are IFS handles [XP1_IFS_HANDLES] by using these descriptors
with standard Windows I/O facilities, such as ReadFile and WriteFile."
So, I thought that if I create socket from WSAPROTOCOL_INFO which has not
XP1_IFS_HANDLES flag set, I cannot use it with ReadFile[Ex] or CancelIo.
But it's written that if SPI does not create IFS handle, it must use
WPUCreateSocketHandle to create one. And in WPUCreateSocket handle docs I
can read that it returns handle that can be used in file I/O functions.
So, can I _always_ depend on file I/O working on sockets, especially when
choosing protocol without XP1_IFS_HANDLES?



Relevant Pages

  • Re: General Question on Structure
    ... I've got a few of the InvokeRequired's in the code as well for other things but when I found BackgroundWorker, it seemed like a much more friendly way of handing the cross-thread issue. ... Serial port event from RF device received by Form A closes frmKeypad1 ... I have threads in the code for the socket work and to grab data to serve the audio, but I'm getting these cross-thread errors in other places... ... I don't know about the SerialPort class, but other i/o classes use a special kind of thread pool known as the IOCP thread pool, that is optimized for dealing with i/o. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How do you kill a completely locked up thread?
    ... The one way to cancel pending I/O on a socket and unwedge ... // Call BeginInvoke on delegate. ... // Note on last two parameters of Delegate BeginInvoke Method: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How do you kill a completly locked up thread?
    ... This seems to be the only C# method I know of to kill a thread. ... For one thing, you can kill off the thread corresponding to the Thread object, but this is not guaranteed to be the thread doing the actual blocking I/O, it might just be waiting on another thread. ... When the thread is doing this connect (it will happen with even a simple TCP/IP socket connect) issue a Thread.Abortfrom another thread and you will see that the ThreadAbortException will NOT be thrown until the Connect call returns. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Related to LSP
    ... when i am trying to create a socket on port 5101 it is giving me ... IFS Model is and how it is related to Overlapped I/O.. ... OVerlapped I/O: One creates a separate thread for each socket created ... "An LSP cannot create socket handles that are true IFS handles since ...
    (microsoft.public.win32.programmer.networks)
  • Re: Related to LSP
    ... when i am trying to create a socket on port 5101 it is giving me ... IFS Model is and how it is related to Overlapped I/O.. ... OVerlapped I/O: One creates a separate thread for each socket created ... "An LSP cannot create socket handles that are true IFS handles since ...
    (microsoft.public.win32.programmer.networks)