bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Imposible to determine source IP in TCPStream & TCPSocket?


From: David Sugar
Subject: Re: Imposible to determine source IP in TCPStream & TCPSocket?
Date: Thu, 26 Aug 2004 08:43:42 -0400
User-agent: Mozilla Thunderbird 0.7.3 (X11/20040803)

getSender, in the Socket base class, is used to peek (examine) the origin of the next waiting packet in the socket receive buffer. Since TCP sockets receive from a connected state, the origin is already known and does not change, hence getPeer. I think getSender got stubbed out into a private member in TCPStream just so that it did not get inherited as a public method or get used, since it was inappropiate for use there.

Andrey Kulikov wrote:
Hello David,

DS>  From the TCPStream did you try the getPeer methods?

Yes, if in previous example i write
InetHostAddress addr = stream->getPeer(&pp);
all works fine.
Thanks.
But what the difference between getSender() and getPeer() for TCPStream?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]