PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Different modes
  • How a client application works
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
3. Managing sockets
Previous pageTable of contentsNext page
WINDEV includes advanced socket management functions.
A socket is a communication resource used by applications to communicate between two computers regardless of the type of network.
This communication mode can be used, for example, to establish a communication between computers connected by Internet.
Different modes
WINDEV applications can manage sockets according to different modes:
  • WINDEV Client application: the application connects to any server and exchanges data via a socket.
  • WINDEV "Simplified server" application: the WINDEV application is a server that exchanges information via a socket with a single client computer.
  • WINDEV "Standard server" application: the WINDEV application is a server that exchanges information via a socket with multiple client computers.
How a client application works
A client application of a socket server connects to a standard server to exchange information via a socket.
Example: A WINDEV client application can connect to a standard news server on the Internet.
Step 1: Connecting to the server
To connect to a server socket, use SocketConnect. This function makes a connection request to the server. The socket is identified by its port and address.
Step 2: Exchanging data
Once two machines have connected their sockets, a communication channel is established between them. These two machines can read from and write character strings to the socket.
To read from and write to the socket of the server, the WINDEV client application must use SocketRead and SocketWrite.
Step 3: End of communication
To end the communication, close the socket from the client machine 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
Comments
Click [Add] to post a comment