Mobile TCP server problem
-
wrote on 29 Sept 2010, 21:18 last edited by
Hi !
I'm developing a mobile client-server application using Qt 4.6.3. The server part resides on mobile device (Symbian), the client part is a desktop application.
The problem is that no access point selection dialog appears when i make QTcpServer listen for incoming connections. The app works perfectly in simulator but on the device it doesn't. Below is the code fragment of which i'm unsure:@QTcpServer *accelServer;
...
accelServer = new QTcpServer(this);
...
accelServer->setMaxPendingConnections(1);
if(!accelServer->listen(QHostAddress::Any, 9999))
ui->textBrowser->setText("oops");
else
ui->textBrowser->setText(QString("Listening on %1:%2").arg(accelServer->serverAddress().toString()).arg(accelServer->serverPort()));
@When I run any application that initiates requests the system asks me for AP... But the server just starts saying "Listening on 0.0.0.0:9999" and nothing happens.
Do I have to initiate network connection manually ? And if so then what should i do for that ?
Thanx in advance :)
-
wrote on 29 Sept 2010, 22:20 last edited by
For what do you need such scheme? Maybe it is possible to connect from mobile to desktop?
-
wrote on 29 Sept 2010, 22:37 last edited by
I haven't reviewed Max's code but I did want to share a link to prior work on mobile web servers. "Here":http://blog.symbian.org/2009/08/07/because-we-can-part-i-the-really-mobile-web/ is an article by Mark Wilcox on Nokia's PAMP. It provides you with some motivation for why you'd want one.
-jk
-
wrote on 30 Sept 2010, 05:09 last edited by
You might need to use the Bearer Management API from Qt Mobility in order to get the access point selection going:
"bearer-management.html":http://doc.qt.nokia.com/qtmobility-1.1-tp/bearer-management.html[edit: Marek up link, Tobias Hunger]
1/4