public double ConnectionTime { get; }
A double value representing the last time the client established a connection.
This double value represents an OLE Automation DateTime, where the integral component is the number of days before or after midnight, 30 December 1899, and the fractional component represents the time on that day divided by 24.
If the method fails, an error is raised. For more information, refer to the Error Codes.
using Leadtools;using Leadtools.MediaStreaming;public Server _server = null;public bool _result = false;public void PrintClientsExample(){try{int Count = 0;string strClients = "";// create an instance of the server object_server = new Leadtools.MediaStreaming.Server();// edit network propertiesNetworkProperties netProps = _server.GetNetworkProperties();string HttpUrl = "http://" + netProps.ActualIPAddress + ":" + netProps.Port + "/DaDa_H264.mp4";netProps.MediaFolder = @"C:\LEADTOOLS22\Resources\Media";_server.SetNetworkProperties(netProps);// start the server_server.Start();// make sure that there is some clients connected to the server.System.Diagnostics.Process.Start(HttpUrl);MessageBox.Show("Attempting to playback stream in default browser using: " + HttpUrl+ "\n Press OK button AFTER video starts playing");// retrieve collection of clientsClients clients = _server.GetClients();//Get the Application Properties countCount = clients.Count;// print the clients items to a stringstrClients += string.Format("--- Clients (count = {0}) ---\n\n", Count.ToString());int nIndex = 0;foreach (Client client in clients){string ip;int connections;double connectiontime;// get IP Addressip = client.IPAddress;// get number of connectionsconnections = client.Connections;// get connection timeconnectiontime = client.ConnectionTime;// convert to local timeDateTime dt = DateTime.FromOADate(connectiontime);DateTime dtLocal = dt.ToLocalTime();string sconnectiontime = dtLocal.ToString("yyyy-MM-dd HH:mm:ss");strClients += string.Format("Client[{0}]: {1}, connections = {2}, connection time = {3}\n", nIndex.ToString(), ip, connections.ToString(), sconnectiontime);nIndex++;}// display a message contains the clients information stringMessageBox.Show(strClients, "LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information);_result = true;}catch (Exception){_result = false;}}