From my Indy gitter archive:
@jpluimers
From a TIdIOHandlerSocket or TIdSocketHandle: is it possible to see who has initiated the connection? i.e. if it’s Binding.Peer that initiated to Binding.IP or the other way around?@rlebeau
A socket is bidirectional, it doesn’t know or care which direction the connection was initially established. You will have to keep track of that yourself based on whether the socket is coming from a client component or a server component.@jpluimers
I was afraid so. No problem: thanks for confirming.
So I made a helper class for TIdSocketHandle that gets you a SummaryString based on a direction enumeration: TIdSocketHandleHelper.
Notes:
- [Archive.is] TIdTCPConnection.Socket Property is of type [Archive.is] TIdIOHandlerSocket Class
- [Archive.is] TIdIOHandlerSocket.Binding property is of type [Archive.is] TIdSocketHandle Class
–jeroen