Both of them are actually the same method. The Socket
property points to the same IOHandler
component when it is a TIdIOHandlerSocket
remote object (which is the most time-consuming), and is nil
otherwise. You should use the IOHandler
property directly for most I / O operations, as it offers more flexibility when using Indy with various types of I / O systems. The Socket
property is a useful shortcut for socket functions, such as access to IP / port values corresponding to the socket.
source share