This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Net functions
  • Server parameters
  • Username and password
  • Receiving messages
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
This function is kept for backward compatibility. It is recommended to use a standard FTP, SSH or SCP server. For more details, see Handling files on an FTP server and Standard FTP functions.
Starts an FTP (File Transfer Protocol) or RPC (Remote Procedure Call) server powered by WINDEV.
ConnectRPC is int
// Connects to an RPC server on port 5010
ConnectRPC = NetStartServer(RPCServer, False, 5010)
<Result> = NetStartServer(<Server> [, <Encryption> [, <Port number> [, <Key> [, <Server IP address>]]]])
<Result>: Integer
  • Server ID,
  • 0 if the connection failed.
<Server>: Constant
Type of server:
FTPServerA WINDEV FTP server is used. File functions are supported (NetGetFile and NetSendFile for example).
RPCServerA WINDEV RPC server is used.
<Encryption>: Optional boolean
  • True to encrypt the transmitted data,
  • False (default value) for no encryption.
If the server is started with the encryption option set to True, the client computers must connect with NetConnect by using <Encryption> = True.
If an encryption is requested, the connection key (<Key>) will also be encrypted.
<Port number>: Optional integer
Number of the port on which the server will be run. By default, the client tries to connect to the server:
  • on port 2000 for WINDEV RPC.
  • on port 2001 for WINDEV FTP.
<Key>: Optional character string
Used to secure the access to the server. Each client trying to connect to the server must use the same key as the one defined by NetStartServer. The connection is refused if the keys are different.
If the <Encryption> parameter is set to True, the key is encrypted.
<Server IP address>: Optional character string
Server IP address. This parameter must be specified if the server has several IP addresses (server using several network cards for example). This IP address can have the following format:
  • IP address in XXX.XXX.XXX.XXX format ( for example).
  • IP address containing the server name ( for example). This syntax is recommended.
  • IP address returned by NetIPAddress.

Server parameters

The server parameters are required before a connection is established:
  • If the port number is specified, the client will have to use the same port number in NetConnect.
  • If the server is started with <Encryption> set to True, the clients must connect with <Encryption> set to True in NetConnect.
  • If the server is started with a specific <Key>, the clients must connect by specifying the same <Key> in NetConnect.

Username and password

The <UserName> and <Password> parameters allow the server to check whether the user is authorized or not. The list of authorizations and passwords for the users is available in the WDRPCSRV.INI file found in the directory of the server project. Example of file content:

Receiving messages

The messages are received via events whose number is chosen by the developer.
Component: wd280com.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help