Home | Sign in | English EN
  • Different possibilities
  • Principle of client application
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
3. Managing sockets
Previous pageTable of contentsNext page
WINDEV includes advanced socket management functions .
A socket is a communication resource used by the applications to communicate between computers regardless of the network type.
This communication mode can be used, for example, to establish a communication between computers connected by Internet.
Different possibilities
WINDEV applications can manage sockets according to different modes:
  • Client WINDEV application: the application connects to any server and it exchanges data via a socket.
  • WINDEV "Simplified server" application: the WINDEV application is a server, exchanging information via sockets with a single client computer.
  • WINDEV "Standard server" application: the WINDEV application is a server, exchanging information via sockets with several client computers.
Principle of client application
A client application of a socket server connects to a standard server in order to exchange information via socket.
Example: A client WINDEV application can connect to a standard news server on Internet.
Step 1: Connecting to the server
To connect to a server socket, use SocketConnect. This function is used to perform a request for connecting to the server. The socket is identified by its port and by its address.
Step 2: Exchanging data
Once two computers have connected their socket, a communication channel is established between these two computers. These two computers can read and write character strings on the socket.
To read and write on the server socket, the WINDEV client application must use SocketRead and SocketWrite.
Step 3: End of communication
To end the communication, all you have to do is close the socket from the client computer with SocketClose.
The different steps can be represented as follows:
Remark: the SocketXXX functions can also be used to manage secured sockets according to the SSL protocol. To do so, use SocketCreateSSL and SocketConnectSSL.
Previous pageTable of contentsNext page
Click [Add] to post a comment