| 4D v20IT_PPPStatus | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D v20
 IT_PPPStatus 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IT_PPPStatus ( pppProfil ) -> Funktionsergebnis | ||||||||
| Parameter | Typ | Beschreibung | ||||||
| pppProfil | String |   | Dial-up name = Null string on Mac OS, optionally filled under Windows | |||||
| Funktionsergebnis | Ganzzahl |   | 1 if connected; 0 if connecting; -1 if error | |||||
The IT_PPPStatus command allows you to check the status of a connection opened with the IT_PPPConnect command or opened manually.
pppProfil is a text value specifying which opened connection to check.
Under Windows, this parameter is optional but may be useful to ensure good running whatever the user network configuration.
This parameter is not taken into account.
IT_PPPStatus returns an integer denoting the connection status. It returns:
  //Method GetMessages (this method is executed in a process)
 If(mPPPConnect($vPPPProfil;120))
    $vErrCode:=IT_MacTCPInit
    If($vErrCode=0)
       $vErrCode:=POP3_Login...
       ...
    Else
       ALERT("Connection failed")
    End if
 End if
 
  //Method mPPPConnect
 C_BOOLEAN($0) //returns True if we are currently connected, False if connection failed
 C_TEXT($1) //null string if Mac OS, Entry Name if Windows
 C_LONGINT($2) //timeout in seconds
 
 If(IT_PPPStatus=1)
    $0:=True //we are already connected
 Else
    $vTimeoutLength:=$2
    $vTimeout:=False
    $vErr:=IT_PPPConnect($1)
    If($vErr=0)
       $vStart:=Current time
       Repeat
          DELAY PROCESS(Current process;30)
          $vStatus:=IT_PPPStatus($1)
          $vTimeout:=((Current time-$vStart)>$vTimeoutLength)
       Until(($vStatus=1)|$vTimeout) //we are connected or time out
       If(Not($vTimeout))
          $0:=True //we are connected
       End if
    End if //… $Err = 0
 End if
	Produkt: 4D
	Thema: IC Utilities
	Nummer: 
        88852
        
        
        
	
	Erstellt: 4D Internet Commands 6.8.1
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Internet Commands ( 4D v20)
	
	
 Fehler melden
Fehler melden