PDA

View Full Version : I get DIFFERENT IP addresses by QAbstractSocket::peerAddress ()



Vdo
8th October 2010, 10:40
Hi! I am using function
QHostAddress QAbstractSocket:: peerAddress () const
to get connected host address. After this, i get ip address as QString with
peerAddress().toString() .
By connecting server with 3G wirelless mobile internet (T-Mobile SK, Huawei modem, data 10GB ) i get my ip address from one server 195.91.55.216 and from another server i get 195.91.56.216 (within one internet connection session - no disconnections during connecting both servers, servers not connecting in one time but one after one). Both servers are running on windows server 2008 R2 datacenter and server application is using QT 4.6 (using class QSslSocket).

Can you tell me somebody what is wrong? Thanx...
Vladimir from Slovakia

squidge
8th October 2010, 13:21
Over 3G, the IP address is not guaranteed to remain stable during sessions. With some carriers you can request this, but it usually costs lots of cash.