ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Net functions
  • Server parameters
  • Username and password
  • Standard FTP
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
Warning
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.
Connects to an FTP (File Transfer Protocol) or RPC (Remote Procedure Call) server powered by WINDEV.
Remark: the connection of a new client cannot be automatically detected. A specific programming is required.
Example
ConnectRPC is int
// Connects to an RPC server on port 5010
ConnectRPC = NetConnect("148.61.125.245", RPCServer, ...
"USERNAME1", "PWD1", False, INTERNET, 5010)
Syntax
<Result> = NetConnect(<Computer Address> , <Server> , <Username> , <Password> [, <Encryption> [, <Type of network> [, <Port number> [, <Key>]]]])
<Result>: Integer
  • Connection ID,
  • 0 if the connection failed. ErrorInfo returns more details about the error.
<Computer Address>: Character string
<Server>: Constant
Type of server:
FTPServerA WINDEV FTP server is used. All the NET functions can be used.
RPCServerA WINDEV RPC server is used. The functions for file transfer are not available.
<Username>: ANSI character string
Name of user who is trying to connect. Combined with <Password>, this parameter allows you to identify the user (see the Notes).
<Password>: ANSI character string
Password associated with the user who is trying to connect (see the Notes).
<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 (NetStartServer), the client computers will have to connect with NetConnect by using <Encryption> = True.
If the encryption is requested, the connection key (<Key> parameter) will also be encrypted.
<Type of network>: Optional integer constant
Timeout used for the connection. This parameter can correspond to:
  • the duration of response time-out in milliseconds,
  • a specific constant.
    INTERNET
    (default value)
    Value suited for Internet (long response time)
    INTRANETValue suited for Intranet (short response time)
<Port number>: Optional integer
Number of the port on which the server will be run. By default, the client attempts to connect to the server on port 2000 for RPC and on port 2001 for FTP.
<Key>: Optional Ansi 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.
Remarks

Server parameters

Some server parameters are required before a connection can be established:
  • Server IP address
  • Type of server: RPC or FTP
  • Server encryption
  • Server port
  • Key if it is specified when starting the server

Username and password

The <Username> and <Password> parameters allow the server to determine whether or not it is an authorized user.
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:
[Passwords]
USERNAME1 = PASS1
USERNAME2 = PASS2
USERNAME3 = PASS3

Standard FTP

WINDEV allows you to use a standard FTP with FTPConnect.
Business / UI classification: Business Logic
Component: wd290com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/20/2023

Send a report | Local help