AK.F1.Timing.Utility.Server.Program.Live C# (CSharp) Method

Live() public method

Proxies the live-timing message stream to connected clients.
/// Thrown when or is /// . /// /// Thrown when or is empty. /// /// Thrown when is not positive. ///
public Live ( string username, string password, IPEndPoint endpoint = null, int connectionBacklog = 50 ) : void
username string A valid www.formula1.com username.
password string The corresponding password.
endpoint System.Net.IPEndPoint The endpoint to bind to. The default is any on 4532.
connectionBacklog int The accept connection backlog.
return void
        public void Live(string username, string password, IPEndPoint endpoint = null, int connectionBacklog = 50)
        {
            Guard.NotNullOrEmpty(username, "username");
            Guard.NotNullOrEmpty(password, "password");
            Guard.InRange(connectionBacklog > 0, "connectionBacklog");

            try
            {
                var reader = F1Timing.Live.Read(F1Timing.Live.Login(username, password));
                RunCore(reader, endpoint, connectionBacklog);
            }
            catch(Exception exc)
            {
                Log.Fatal(exc);
            }
        }