Click or drag to resize

Connection Class

Represents the logical connection between a specific Perforce Server instance and a specific client application.
Inheritance Hierarchy
SystemObject
  Perforce.P4Connection

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.258.5793
Syntax
public class Connection : IDisposable

The Connection type exposes the following members.

Constructors
  NameDescription
Public methodConnection
Construct a Connection given a Server
Top
Properties
  NameDescription
Public propertyApiLevel
What API level does the server support?
Public propertyCharacterSetName
The CharacterSet to use for this connection
Public propertyClient
Property to access client object
Public propertyClientMetadata
Property to access Client Metadata
Public propertyCommandTimeout Obsolete.
Public propertyCredential
Property to access Credentials
Public propertyCurrentWorkingDirectory
Set CurrentWorkingDirectory for this server
Public propertyKeepAlive
Callback to allow the client/user to cancel a long running command
Public propertyKeepAliveDelay
Time for a command to run before allowing the client/user to cancel a long running command
Public propertyLastResults
The results of the last command executed
Public propertyServer
Property to access Server associated with connection
Public propertyStatus
Property to access Connection Status
Public propertyUserName
Property to access User Name
Top
Methods
  NameDescription
Public methodCancelCommand(P4Command)
Cancel a running command
Public methodCancelCommand(UInt32)
Cancel a running command
Public methodConnect
Connect to the server with the given options
Public methodconnectionEstablished
returns true if the connection has been made
Public methodCreateCommand
Create a P4Command that can be run on the connection
Public methodDisconnect
Disconnect from the server
Public methodDisconnect(Options)
Disconnect from the server
Public methodDispose
Dispose of connection. Forces disconnect
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetActiveTicket
Returns the ticket used by the current connection
Public methodGetExistingTicket
Get the existing ticket if any for a user on the specified server
Public methodGetHashCode (Inherited from Object.)
Public methodGetMapApi
Create a P4.P4MapApi object to be used on the current server connection
Public methodGetP4ConfigFile
The config file used by the connection (if any)
Public methodGetP4ConfigFile(String)
The config file that will be used by a given directory (if any)
Public methodGetP4EnvironmentVar
Get the value of an P4 environment variable
Public methodgetP4Server
Return the server connection
Public methodGetType (Inherited from Object.)
Public methodIsFileIgnored
Is this file ignored based on the file specified by p4ignore (if any)
Public methodLogin(String)
Automate the Login to the Perforce Server
Public methodLogin(String, Options)
Login to the Perforce Server
Public methodLogin(String, Boolean)
Runs the login process. If the server is using ticket based authentication, actually runs the logon three times. Once to login and update the ticket file, once to get the ticket from the server and finally once to get the ticket expiration data.
Public methodLogin(String, Options, String)
Run a Login on the Perforce Server
Public methodLogout
Logout of the Perforce server
Protected methodMemberwiseClone (Inherited from Object.)
Public methodReleaseConnection
Release the connection held by the bridge to the server. This will cause the bridge to call init before the next command is run, forcing it to reinitialize any cached connection settings.
Public methodSetClient
Set the client for this connection
Public methodSetP4EnvironmentVar
Set the value of an P4 environment variable
Public methodSetPassword(String, String)
Set the current user's password on the Perforce server.
Public methodSetPassword(String, String, String)
Set the a user's password on the Perforce server.
Public methodToString (Inherited from Object.)
Public methodTrust
Run the client side command trust
Public methodTrustAndConnect
Connect to an ssl server, handle trust handshake
Top
Events
  NameDescription
Public eventCommandEcho
Handler for Command Echo
Public eventErrorReceived
Handler for Error Results
Public eventInfoResultsReceived
Handler for Info Results
Public eventResponseTimeEcho
Handler for Response Time Echo
Public eventTaggedOutputReceived
Handler for Tagged Output
Public eventTextResultsReceived
Handler for Text Results
Top
See Also