Flynet Viewer .NET Programmer's Reference

GetSessionUser Method (static)

GetSessionUser Method (static)

Previous topic Next topic  

GetSessionUser Method (static)

Previous topic Next topic  

Return the HostConnection.owner property as well as the Host Name associated to the provided sessionKey.  This method avoids the need to connect a session in order to query the active owner and host name property.

 

String HostConnection.GetSessionUser(String sessionKey, ref String hostName);

 

Arguments

 

HostConnection

Required. HostConnection class Reference (this is a static method, no HostConnection object need be created prior to calling this method

 

sessionKey

Required. The session key for the active session to query.  If the session key is not valid, nulls are returned.

 

hostName

Required. Will be set with the host name for the session, if the session key is valid.

 

Remarks

 

Returns the userID (owner property for the session) or null if the sessionKey provided is invalid/timed-out.  Also returns the host name that the session is connected to.

 

The following c# example shows a wrapper method that returns a session user as well as setting the host name for a sessionkey.

 

 string GetSessionUser(string sessionKey, ref string hostName)

 {

         return HostConnection.GetSessionUser(sessionKey, ref hostName);

 }