Difference between revisions of "Server Access"


Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /www/htdocs/w0102f68/fos/wiki/includes/MagicWord.php on line 902
From FOS Wiki
Jump to: navigation, search
(Added description fir ip adress, not finished ye! see todo)
m (added how to find out the router port)
Line 2: Line 2:
 
The first thing to do is add ''networking'' to the project file, so that Qt knows that we wanna work with the network model.  
 
The first thing to do is add ''networking'' to the project file, so that Qt knows that we wanna work with the network model.  
  
When the waiter starts the orderman the application has to find out the ip adress and the port which allows the communication with the server. The port is set in the application settings and must correspond to the FOS server port specified in the server settings. The ip adress of the router TODO
+
When the waiter starts the orderman the application has to find out the ip adress and the port which allows the communication with the server. The port is set in the application settings and must correspond to the FOS server port specified in the server settings. The class [http://qt-project.org/doc/qt-5.1/qtnetwork/qnetworkconfigurationmanager.html#details QNetworkConfiguration] provides access to the network configurations known to the system and allows to find out the router port with the function [http://qt-project.org/doc/qt-5.1/qtnetwork/qnetworkconfigurationmanager.html#allConfigurations allConfigurations]().
  
 
The orderman socket implements a [http://qt-project.org/doc/qt-5.1/qtnetwork/qtcpsocket.html QTcpSocket]. The function ''Connect'' connects the application socket to the FOS server. If the communication fails the user will be asked to set the right port. The application settings and an explanation how to set the correct port will be shown.
 
The orderman socket implements a [http://qt-project.org/doc/qt-5.1/qtnetwork/qtcpsocket.html QTcpSocket]. The function ''Connect'' connects the application socket to the FOS server. If the communication fails the user will be asked to set the right port. The application settings and an explanation how to set the correct port will be shown.
Line 9: Line 9:
  
 
The socket will be closed when the waiter logs out.
 
The socket will be closed when the waiter logs out.
+
 
 
= Android Permissions =
 
= Android Permissions =
 
The order man application must have the appropriate permissions that allow the connection to the server. An important permission to do that is the [http://developer.android.com/reference/android/Manifest.permission.html#INTERNET INTERNET] permission, which allows applications to open network sockets.
 
The order man application must have the appropriate permissions that allow the connection to the server. An important permission to do that is the [http://developer.android.com/reference/android/Manifest.permission.html#INTERNET INTERNET] permission, which allows applications to open network sockets.

Revision as of 15:31, 26 November 2013