Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 1445

Indy Sockets and getting a description on the connection depends on the direction

$
0
0

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:

–jeroen


Viewing all articles
Browse latest Browse all 1445

Trending Articles