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
m (The class FOSClient)
m (some updates...)
Line 4: Line 4:
 
==The Client==
 
==The Client==
  
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 user will also be advertised to turn on wifi.
+
The orderman socket uses the class [http://qt-project.org/doc/qt-5.1/qtnetwork/qtcpsocket.html QTcpSocket] to communicate with the FOS server. The function ''connect()'' connects the application socket to the FOS server on login. 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 user will also be advertised to turn on wifi.
  
 
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]().
 
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 function ''Send'' sends the JSON objects to the server and the function ''Receive'' waits for the answer.
+
The function ''send()'' sends the JSON objects to the server. When the signal ''readyRead()'' is emitted by the server it means that the server sent back a JSON object.
  
 
The socket will be closed when the waiter logs out.
 
The socket will be closed when the waiter logs out.

Revision as of 23:35, 6 December 2013