title: What's the idiomatic way to do async socket programming in Delphi?
body: <p>What is the normal way people writing network code in Delphi use Windows-style overlapped asynchronous socket I/O?</p>
  
  <p>Here's my prior research into this question:</p>
  
  <p>The <a href="http://indyproject.org/" rel="noreferrer">Indy</a> components seem entirely synchronous. On the other hand, while ScktComp unit does use WSAAsyncSelect, it basically only asynchronizes a BSD-style multiplexed socket app. You get dumped in a single event callback, as if you had just returned from select() in a loop, and have to do all the state machine navigation yourself.</p>
  
  <p>The .NET situation is considerably nicer, with Socket.BeginRead / Socket.EndRead, where the continuation is passed directly to Socket.BeginRead, and that's where you pick back up. A continuation coded as a closure obviously has all the context you need, and more.</p>