View Full Version : QTcpSocket on Symbian (access point required)

13th May 2011, 18:52
Hi to everybody,

i've a client that use a QTcpSocket to connect itself to a QTcpServer.

All is fine on Windows, but when i deploy the client on Symbian while the server running on Windows, the application require me to select an internet access point but i use this:

client side

connectToServer(QHostAddress(QHostAddress::LocalHo st).toString(), 9876);

server side

server.listen(QHostAddress(QHostAddress::LocalHost ), 9876)

Can somebody help me?

Many thanks!

14th May 2011, 09:52
If the client and server run on different hosts then QHostAddress::LocalHost will not work -- it's an address that loops back to the same machine (google for "loopback" for more info). You need to give a proper address of the server to your client.