|
|
|
|
|
- Server parameters
- Username and password
- Standard FTP
NetConnect (Function) In french: NetConnecte 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. 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:
| | FTPServer | A WINDEV FTP server is used. All the NET functions can be used. | RPCServer | A 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) | INTRANET | Value 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 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
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 WINDEV allows you to use a standard FTP with FTPConnect. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|