I want to establish tcp connection between iphone and PC. On PC QTspServer is running and working (was tested with other client application).
Here is the connection method i'm using on iphone:
- (IBAction)connectToServer:(id)sender { CFReadStreamRef read = NULL; CFWriteStreamRef write = NULL; NSString *host = @"192.168.1.169"; CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault, (CFStringRef)host, 1000, &read, &write); CFWriteStreamOpen(write); int k = 0; } The server on PC is not reacting. Any help is appropriate
By the way: Server is nothing more then a QTcpServer with replemented incomingConnection method. Here is the main function on server side:
int main(int argc, char **argv) { QApplication app(argc, argv); AbstractServer server; server.listen(QHostAddress::Any, 1000); QLabel label("Hello server"); label.setFixedSize(400, 400); label.show(); return app.exec(); }