I have seized on the idea of GetMem using separate threads of sending and receiving. In my program I use a very slimmed-down variant of the original utcpsockets.pas, but I wanted to share the result so I have re-applied my changes to utcpsockets.pas.
@GetMem, maybe you might want to have a look on it whether the changes concord with your concepts. I tried to be as minimally invasive as possible.
@kupferstecher: I had thought about setting the timeout to zero, too, but that would be equal to polling, won't it? I want to avoid this situation because it consumes CPU-time for nothing.
About the ports, I'd have expected that it won't work. But my tests have been positive so far: the concept seems to work. I use two separate TBlockSockets configured with the same settings so they won't interfere with each other. And because on is only sending and the other one is only receiving, there should be no conflict on the socket either. However, I haven't tested high loads yet.