4D Internet Commands v14IT_PPPStatus |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Internet Commands v14
IT_PPPStatus
|
IT_PPPStatus ( pppProfil ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
pppProfil | String |
![]() |
Dial-up name = Null string on Mac OS, optionally filled under Windows | |||||
Function result | Integer |
![]() |
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_INTEGER($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
Product: 4D Internet Commands
Theme: IC Utilities
Number:
88852
Created: 4D Internet Commands 6.8.1
IT_PPPConnect
IT_PPPDisconnect
4D Internet Commands ( 4D Internet Commands v11.4)
4D Internet Commands ( 4D v13.2)
4D Internet Commands ( 4D Internet Commands v12.1)
4D Internet Commands ( 4D Internet Commands v14 R2)
4D Internet Commands ( 4D Internet Commands v14)
4D Internet Commands ( 4D Internet Commands v14 R3)
4D Internet Commands ( 4D Internet Commands v14 R4)