QTcpServer with wifi dongle
-
Hi,
my purpose is to use my program, that includes a QTcpServer to communicate through sockets with a 3-part robot connected to the server machine with wifi (with the usage of a wifi adapter).I tested my server and my client in localhost, now I would like to move the client to the 3-part robot. May it work?
With bluetooth, it wouldn't work because there are a particular socket to use (QBluetoothSocket, https://doc.qt.io/qt-5/qbluetoothsocket.html ).With wifi adapter, is it a problem such as bluetooth or a similar code may work? Thanks
[...] server = new QTcpServer(this); auto x = server->listen(QHostAddress::Any, 1024); [...] while (server->hasPendingConnections()) { QTcpSocket *socket = server->nextPendingConnection(); [...] }
Thanks
-
@LordMat said in QTcpServer with wifi dongle:
now I would like to move the client to the 3-part robot. May it work?
You did not say anything about the robot. What is the OS?
If you can use Qt on it you can use your client code there."With wifi adapter, is it a problem such as bluetooth or a similar code may work?" - I don't understand this.
If your WiFi adapter is workingand you have WiFi connection QTcpSocket will work. -
Hi jsulm, my robot has linux as well.
@jsulm
"With wifi adapter, is it a problem such as bluetooth or a similar code may work?" - I don't understand this.
->
I mean: with bluetooth, I need a "special" socket, QBluetoothSocket, instead of QTcpSocket.
With a connection realised through wifi, do I need a special socket as well or QTcpSocket is ok?Thanks