Sends a StartApplicationSession message to the server.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public int StartApplicationSession( string serverIp, int serverPort, string applicationName, string userName, string userPassword, int sessionCleanupDelay, int sessionDuration, string protocolVersion, bool secure, Object userState, bool startAutoKeepAlive, bool allowCertificateHostnameMismatch, LocalCertificateSelectionCallback userCertificateSelectionCallback )
Public Function StartApplicationSession ( _ serverIp As String, _ serverPort As Integer, _ applicationName As String, _ userName As String, _ userPassword As String, _ sessionCleanupDelay As Integer, _ sessionDuration As Integer, _ protocolVersion As String, _ secure As Boolean, _ userState As Object, _ startAutoKeepAlive As Boolean, _ allowCertificateHostnameMismatch As Boolean, _ userCertificateSelectionCallback As LocalCertificateSelectionCallback _ ) As Integer
public: virtual int StartApplicationSession( String^ serverIp, int serverPort, String^ applicationName, String^ userName, String^ userPassword, int sessionCleanupDelay, int sessionDuration, String^ protocolVersion, bool secure, Object^ userState, bool startAutoKeepAlive, bool allowCertificateHostnameMismatch, LocalCertificateSelectionCallback^ userCertificateSelectionCallback ) sealed
Parameters
- serverIp (String)
- IP Address of the server (e.g., 135.9.30.33)
- serverPort (Int32)
- Port that the socket should be opened on. Typically, 4721 is used for unsecure communications and 4722 should be used for secure (encrypted) communications to the server.
- applicationName (String)
- Name of the application making the call. If this is null or "" then DefaultApplicationName will be used.
- userName (String)
- User's name which is to be used to login to the server.
- userPassword (String)
- User's password which is to be used to login to the server.
- sessionCleanupDelay (Int32)
- How many seconds should the server wait before cleanup is initiated.
- sessionDuration (Int32)
- How long (seconds) should the session last if no keep alives (Reset Application Session) messages are sent. A reasonable value is 180 (3 minutes).
- protocolVersion (String)
- What version of AES protocol should be used.
- secure (Boolean)
- True is secure sockets should be used.
- userState (Object)
- A object which will be returned via the StartApplicationSessionResponse callback.
- startAutoKeepAlive (Boolean)
- Set this to true if you want the API framework to automatically send a Reset Application Session message. If this is set to true then the frequency will be 1/3 the value of sessionDuration.
- allowCertificateHostnameMismatch (Boolean)
- True if you want to allow a mismatch in the certificate host/name attributes of the serurity certificate. This field is only used if secure is true.
- userCertificateSelectionCallback (LocalCertificateSelectionCallback)
- The callback method (if any) for the user certificate selection.
Return Value
The Invoke Id of the outgoing XML message
Assembly: ServiceProvider (Module: ServiceProvider)