PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Different possibilities
  • Principle of client application
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
3. Managing sockets
Previous pageTable of contentsNext page
WINDEV proposes several functions used to perform an advanced management of sockets.
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
A WINDEV application can manage the 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:
Note: 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
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment