Closed alberk8 closed 1 month ago
In my opinion, we need to have clear separation for the IP. One is the source IP (connecting Client IP) and the other is the IP of the Supersocket instance. The definition has to be clear from the client and server perspective (source vs target).
Session stands for a connection in server side, so session's RemoteEndPoint is the client's endpoint. Session's local endpoint is the server listening endpoint.
Yes, it seems much clearer if we use source/destination for the scenario client => server. But we also need to think about scenario server => client (SuperSocket server side initiates connections to clients). For both scenarios, most of things are same except which side initiates the connection. So source/destination might not be an accurate term all the time.
So the session.RemoteEndPoint
and the session.Connection.RemoteEndPoint
should be refer to the same EndPoint?.
session.Connection.RemoteEndPoint should be from socket directly, but session.RemoteEndPoint may use source endpoint from proxy info. You can consider session.RemoteEndPoint as remote endpoint on the application level.
I am a bit confused with the RemoteEndPoints. It looks like
session.RemoteEndPoint
is the IP of the Client/Remote IP and thesession.Connection.RemoteEndPoint
is the SuperSocket Endpoint IP. Is this correct?