Perforce API for the .Net CLR |
 |
P4Connection.IsValidConnection�Method�
Determines if the Perforce connection is valid.
[Visual�Basic]
Public�Function�IsValidConnection( _
���ByVal
checkLogin�As�
Boolean,�_
���ByVal
checkClient�As�
Boolean�_
)�As�
Boolean
[C#]
public�
bool�IsValidConnection(
���
bool�
checkLogin,
���
bool�
checkClient);
Parameters
-
checkLogin
- if set to
true
it will check if the user is logged in.
-
checkClient
- if set to
true
it will verify the client exists.
Return Value
true
if the connection is valid; otherwise, false
.
Remarks
IsValidConnection performs the following 3 checks (depending on the arguments passed).
Runs p4 info, and verifies the server is valid.
If checkClient is true, verifies that p4 info returns a clientName that is not "*unknown*.
If checkLogin is true, verifies that p4 login -s does not have errors.
See Also
P4Connection Class | P4API Namespace