|
|
@ -80,12 +80,7 @@ namespace MediaBrowser.Controller.Net
|
|
|
|
|
|
|
|
|
|
|
|
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
|
|
|
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual bool SendOnTimer => false;
|
|
|
|
protected bool SendOnTimer => false;
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual void ParseMessageParams(string[] values)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Starts sending messages over a web socket
|
|
|
|
/// Starts sending messages over a web socket
|
|
|
@ -98,11 +93,6 @@ namespace MediaBrowser.Controller.Net
|
|
|
|
var dueTimeMs = long.Parse(vals[0], UsCulture);
|
|
|
|
var dueTimeMs = long.Parse(vals[0], UsCulture);
|
|
|
|
var periodMs = long.Parse(vals[1], UsCulture);
|
|
|
|
var periodMs = long.Parse(vals[1], UsCulture);
|
|
|
|
|
|
|
|
|
|
|
|
if (vals.Length > 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ParseMessageParams(vals.Skip(2).ToArray());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var cancellationTokenSource = new CancellationTokenSource();
|
|
|
|
var cancellationTokenSource = new CancellationTokenSource();
|
|
|
|
|
|
|
|
|
|
|
|
Logger.LogDebug("{1} Begin transmitting over websocket to {0}", message.Connection.RemoteEndPoint, GetType().Name);
|
|
|
|
Logger.LogDebug("{1} Begin transmitting over websocket to {0}", message.Connection.RemoteEndPoint, GetType().Name);
|
|
|
@ -250,6 +240,7 @@ namespace MediaBrowser.Controller.Net
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Logger.LogDebug("{1} stop transmitting over websocket to {0}", connection.Item1.RemoteEndPoint, GetType().Name);
|
|
|
|
Logger.LogDebug("{1} stop transmitting over websocket to {0}", connection.Item1.RemoteEndPoint, GetType().Name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connection.Item1.Dispose();
|
|
|
|
var timer = connection.Item3;
|
|
|
|
var timer = connection.Item3;
|
|
|
|
|
|
|
|
|
|
|
|
if (timer != null)
|
|
|
|
if (timer != null)
|
|
|
|