Files
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

1013 lines
32 KiB
C#

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using BestHTTP.Extensions;
using BestHTTP.Futures;
using BestHTTP.Logger;
using BestHTTP.SignalRCore.Authentication;
using BestHTTP.SignalRCore.Messages;
using Cpp2IlInjected;
namespace BestHTTP.SignalRCore
{
// Token: 0x020019BF RID: 6591
[Token(Token = "0x20019BF")]
public sealed class HubConnection : IHeartbeat
{
// Token: 0x17001875 RID: 6261
// (get) Token: 0x0600997E RID: 39294 RVA: 0x001F5818 File Offset: 0x001F3A18
// (set) Token: 0x0600997F RID: 39295 RVA: 0x001F582C File Offset: 0x001F3A2C
[Token(Token = "0x17001875")]
public Uri Uri
{
[Token(Token = "0x600997E")]
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
get;
[Token(Token = "0x600997F")]
[Address(RVA = "0x415800", Offset = "0x414800", VA = "0x180415800")]
private set;
}
// Token: 0x17001876 RID: 6262
// (get) Token: 0x06009980 RID: 39296 RVA: 0x001F5840 File Offset: 0x001F3A40
// (set) Token: 0x06009981 RID: 39297 RVA: 0x001F5854 File Offset: 0x001F3A54
[Token(Token = "0x17001876")]
public ConnectionStates State
{
[Token(Token = "0x6009980")]
[Address(RVA = "0x411540", Offset = "0x410540", VA = "0x180411540")]
get;
[Token(Token = "0x6009981")]
[Address(RVA = "0x5F1910", Offset = "0x5F0910", VA = "0x1805F1910")]
private set;
}
// Token: 0x17001877 RID: 6263
// (get) Token: 0x06009982 RID: 39298 RVA: 0x001F5868 File Offset: 0x001F3A68
// (set) Token: 0x06009983 RID: 39299 RVA: 0x001F587C File Offset: 0x001F3A7C
[Token(Token = "0x17001877")]
public ITransport Transport
{
[Token(Token = "0x6009982")]
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0")]
get;
[Token(Token = "0x6009983")]
[Address(RVA = "0x415810", Offset = "0x414810", VA = "0x180415810")]
private set;
}
// Token: 0x17001878 RID: 6264
// (get) Token: 0x06009984 RID: 39300 RVA: 0x001F5890 File Offset: 0x001F3A90
// (set) Token: 0x06009985 RID: 39301 RVA: 0x001F58A4 File Offset: 0x001F3AA4
[Token(Token = "0x17001878")]
public IProtocol Protocol
{
[Token(Token = "0x6009984")]
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
get;
[Token(Token = "0x6009985")]
[Address(RVA = "0x415820", Offset = "0x414820", VA = "0x180415820")]
private set;
}
// Token: 0x140000C2 RID: 194
// (add) Token: 0x06009986 RID: 39302 RVA: 0x001F58B8 File Offset: 0x001F3AB8
// (remove) Token: 0x06009987 RID: 39303 RVA: 0x001F58E0 File Offset: 0x001F3AE0
[Token(Token = "0x140000C2")]
public event Action<HubConnection, Uri, Uri> OnRedirected
{
[Token(Token = "0x6009986")]
[Address(RVA = "0x62A970", Offset = "0x629970", VA = "0x18062A970")]
[CompilerGenerated]
add
{
Action<HubConnection, Uri, Uri> onRedirected;
Delegate @delegate;
do
{
onRedirected = this.OnRedirected;
@delegate = Delegate.Combine(onRedirected, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onRedirected)
{
}
}
[Token(Token = "0x6009987")]
[Address(RVA = "0x62AC90", Offset = "0x629C90", VA = "0x18062AC90")]
[CompilerGenerated]
remove
{
Action<HubConnection, Uri, Uri> onRedirected;
Delegate @delegate;
do
{
onRedirected = this.OnRedirected;
@delegate = Delegate.Remove(onRedirected, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onRedirected)
{
}
}
}
// Token: 0x140000C3 RID: 195
// (add) Token: 0x06009988 RID: 39304 RVA: 0x001F5908 File Offset: 0x001F3B08
// (remove) Token: 0x06009989 RID: 39305 RVA: 0x001F5930 File Offset: 0x001F3B30
[Token(Token = "0x140000C3")]
public event Action<HubConnection> OnConnected
{
[Token(Token = "0x6009988")]
[Address(RVA = "0x62A790", Offset = "0x629790", VA = "0x18062A790")]
[CompilerGenerated]
add
{
Action<HubConnection> onConnected;
Delegate @delegate;
do
{
onConnected = this.OnConnected;
@delegate = Delegate.Combine(onConnected, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onConnected)
{
}
}
[Token(Token = "0x6009989")]
[Address(RVA = "0x62AAB0", Offset = "0x629AB0", VA = "0x18062AAB0")]
[CompilerGenerated]
remove
{
Action<HubConnection> onConnected;
Delegate @delegate;
do
{
onConnected = this.OnConnected;
@delegate = Delegate.Remove(onConnected, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onConnected)
{
}
}
}
// Token: 0x140000C4 RID: 196
// (add) Token: 0x0600998A RID: 39306 RVA: 0x001F5958 File Offset: 0x001F3B58
// (remove) Token: 0x0600998B RID: 39307 RVA: 0x001F5980 File Offset: 0x001F3B80
[Token(Token = "0x140000C4")]
public event Action<HubConnection, string> OnError
{
[Token(Token = "0x600998A")]
[Address(RVA = "0x62A830", Offset = "0x629830", VA = "0x18062A830")]
[CompilerGenerated]
add
{
Action<HubConnection, string> onError;
Delegate @delegate;
do
{
onError = this.OnError;
@delegate = Delegate.Combine(onError, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onError)
{
}
}
[Token(Token = "0x600998B")]
[Address(RVA = "0x62AB50", Offset = "0x629B50", VA = "0x18062AB50")]
[CompilerGenerated]
remove
{
Action<HubConnection, string> onError;
Delegate @delegate;
do
{
onError = this.OnError;
@delegate = Delegate.Remove(onError, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onError)
{
}
}
}
// Token: 0x140000C5 RID: 197
// (add) Token: 0x0600998C RID: 39308 RVA: 0x001F59A8 File Offset: 0x001F3BA8
// (remove) Token: 0x0600998D RID: 39309 RVA: 0x001F59D0 File Offset: 0x001F3BD0
[Token(Token = "0x140000C5")]
public event Action<HubConnection> OnClosed
{
[Token(Token = "0x600998C")]
[Address(RVA = "0x62A6F0", Offset = "0x6296F0", VA = "0x18062A6F0")]
[CompilerGenerated]
add
{
Action<HubConnection> onClosed;
Delegate @delegate;
do
{
onClosed = this.OnClosed;
@delegate = Delegate.Combine(onClosed, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onClosed)
{
}
}
[Token(Token = "0x600998D")]
[Address(RVA = "0x62AA10", Offset = "0x629A10", VA = "0x18062AA10")]
[CompilerGenerated]
remove
{
Action<HubConnection> onClosed;
Delegate @delegate;
do
{
onClosed = this.OnClosed;
@delegate = Delegate.Remove(onClosed, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onClosed)
{
}
}
}
// Token: 0x140000C6 RID: 198
// (add) Token: 0x0600998E RID: 39310 RVA: 0x001F59F8 File Offset: 0x001F3BF8
// (remove) Token: 0x0600998F RID: 39311 RVA: 0x001F5A20 File Offset: 0x001F3C20
[Token(Token = "0x140000C6")]
public event Func<HubConnection, Message, bool> OnMessage
{
[Token(Token = "0x600998E")]
[Address(RVA = "0x62A8D0", Offset = "0x6298D0", VA = "0x18062A8D0")]
[CompilerGenerated]
add
{
Func<HubConnection, Message, bool> onMessage;
Delegate @delegate;
do
{
onMessage = this.OnMessage;
@delegate = Delegate.Combine(onMessage, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onMessage)
{
}
}
[Token(Token = "0x600998F")]
[Address(RVA = "0x62ABF0", Offset = "0x629BF0", VA = "0x18062ABF0")]
[CompilerGenerated]
remove
{
Func<HubConnection, Message, bool> onMessage;
Delegate @delegate;
do
{
onMessage = this.OnMessage;
@delegate = Delegate.Remove(onMessage, value);
}
while (@delegate != 0 && @delegate == 0);
while (@delegate != onMessage)
{
}
}
}
// Token: 0x17001879 RID: 6265
// (get) Token: 0x06009990 RID: 39312 RVA: 0x001F5A48 File Offset: 0x001F3C48
// (set) Token: 0x06009991 RID: 39313 RVA: 0x001F5A5C File Offset: 0x001F3C5C
[Token(Token = "0x17001879")]
public IAuthenticationProvider AuthenticationProvider
{
[Token(Token = "0x6009990")]
[Address(RVA = "0x417710", Offset = "0x416710", VA = "0x180417710")]
get;
[Token(Token = "0x6009991")]
[Address(RVA = "0x417A10", Offset = "0x416A10", VA = "0x180417A10")]
set;
}
// Token: 0x1700187A RID: 6266
// (get) Token: 0x06009992 RID: 39314 RVA: 0x001F5A70 File Offset: 0x001F3C70
// (set) Token: 0x06009993 RID: 39315 RVA: 0x001F5A84 File Offset: 0x001F3C84
[Token(Token = "0x1700187A")]
public NegotiationResult NegotiationResult
{
[Token(Token = "0x6009992")]
[Address(RVA = "0x417720", Offset = "0x416720", VA = "0x180417720")]
get;
[Token(Token = "0x6009993")]
[Address(RVA = "0x417A20", Offset = "0x416A20", VA = "0x180417A20")]
private set;
}
// Token: 0x1700187B RID: 6267
// (get) Token: 0x06009994 RID: 39316 RVA: 0x001F5A98 File Offset: 0x001F3C98
// (set) Token: 0x06009995 RID: 39317 RVA: 0x001F5AAC File Offset: 0x001F3CAC
[Token(Token = "0x1700187B")]
public HubOptions Options
{
[Token(Token = "0x6009994")]
[Address(RVA = "0x4177D0", Offset = "0x4167D0", VA = "0x1804177D0")]
get;
[Token(Token = "0x6009995")]
[Address(RVA = "0x417AC0", Offset = "0x416AC0", VA = "0x180417AC0")]
private set;
}
// Token: 0x1700187C RID: 6268
// (get) Token: 0x06009996 RID: 39318 RVA: 0x001F5AC0 File Offset: 0x001F3CC0
// (set) Token: 0x06009997 RID: 39319 RVA: 0x001F5AD4 File Offset: 0x001F3CD4
[Token(Token = "0x1700187C")]
public int RedirectCount
{
[Token(Token = "0x6009996")]
[Address(RVA = "0x483230", Offset = "0x482230", VA = "0x180483230")]
get;
[Token(Token = "0x6009997")]
[Address(RVA = "0x4833D0", Offset = "0x4823D0", VA = "0x1804833D0")]
private set;
}
// Token: 0x06009998 RID: 39320 RVA: 0x001F5AE8 File Offset: 0x001F3CE8
[Token(Token = "0x6009998")]
[Address(RVA = "0x62A430", Offset = "0x629430", VA = "0x18062A430")]
public HubConnection(Uri hubUri, IProtocol protocol)
{
HubOptions hubOptions = new HubOptions();
hubOptions.<SkipNegotiation>k__BackingField = false;
hubOptions.<PreferedTransport>k__BackingField = (TransportTypes)((ulong)0L);
TimeSpan timeSpan;
hubOptions.<PingInterval>k__BackingField = timeSpan;
hubOptions.<MaxRedirects>k__BackingField = (int)((ulong)100L);
}
// Token: 0x06009999 RID: 39321 RVA: 0x001F5B1C File Offset: 0x001F3D1C
[Token(Token = "0x6009999")]
[Address(RVA = "0x62A510", Offset = "0x629510", VA = "0x18062A510")]
public HubConnection(Uri hubUri, IProtocol protocol, HubOptions options)
{
Dictionary<long, Action<Message>> dictionary = new Dictionary();
this.invocations = dictionary;
Dictionary<string, Subscription> dictionary2 = new Dictionary(StringComparer._ordinalIgnoreCase);
this.subscriptions = dictionary2;
base..ctor();
int num = 0;
this.Uri = hubUri;
this.State = (ConnectionStates)num;
this.Options = options;
this.Protocol = protocol;
num += num;
num++;
DefaultAccessTokenAuthenticator defaultAccessTokenAuthenticator;
defaultAccessTokenAuthenticator.StartAuthentication();
defaultAccessTokenAuthenticator._connection = this;
this.AuthenticationProvider = defaultAccessTokenAuthenticator;
}
// Token: 0x0600999A RID: 39322 RVA: 0x001F5B98 File Offset: 0x001F3D98
[Token(Token = "0x600999A")]
[Address(RVA = "0x629CB0", Offset = "0x628CB0", VA = "0x180629CB0")]
public void StartConnect()
{
ConnectionStates connectionStates = this.<State>k__BackingField;
if (connectionStates != ConnectionStates.Initial && connectionStates != ConnectionStates.Redirected)
{
ILogger logger = HTTPManager.Logger;
ConnectionStates connectionStates2 = this.<State>k__BackingField;
return;
}
ILogger logger2 = HTTPManager.Logger;
if (this.<AuthenticationProvider>k__BackingField != 0 && logger2 != 0)
{
ILogger logger3 = HTTPManager.Logger;
int num = 0;
this.SetState(ConnectionStates.Authenticating, num);
IAuthenticationProvider authenticationProvider = this.<AuthenticationProvider>k__BackingField;
OnAuthenticationSuccededDelegate onAuthenticationSuccededDelegate;
onAuthenticationSuccededDelegate.method_ptr = ldftn(OnAuthenticationSucceded);
onAuthenticationSuccededDelegate.method = ldftn(OnAuthenticationSucceded);
onAuthenticationSuccededDelegate.m_target = this;
IAuthenticationProvider authenticationProvider2 = this.<AuthenticationProvider>k__BackingField;
OnAuthenticationFailedDelegate onAuthenticationFailedDelegate;
onAuthenticationFailedDelegate.method_ptr = ldftn(OnAuthenticationFailed);
onAuthenticationFailedDelegate.method = ldftn(OnAuthenticationFailed);
onAuthenticationFailedDelegate.m_target = this;
IAuthenticationProvider authenticationProvider3 = this.<AuthenticationProvider>k__BackingField;
return;
}
this.StartNegotiation();
}
// Token: 0x0600999B RID: 39323 RVA: 0x001F5C60 File Offset: 0x001F3E60
[Token(Token = "0x600999B")]
[Address(RVA = "0x6280F0", Offset = "0x6270F0", VA = "0x1806280F0")]
private void OnAuthenticationSucceded(IAuthenticationProvider provider)
{
ILogger logger = HTTPManager.Logger;
IAuthenticationProvider authenticationProvider = this.<AuthenticationProvider>k__BackingField;
OnAuthenticationSuccededDelegate onAuthenticationSuccededDelegate;
onAuthenticationSuccededDelegate.method_ptr = ldftn(OnAuthenticationSucceded);
onAuthenticationSuccededDelegate.method = ldftn(OnAuthenticationSucceded);
onAuthenticationSuccededDelegate.m_target = this;
IAuthenticationProvider authenticationProvider2 = this.<AuthenticationProvider>k__BackingField;
OnAuthenticationFailedDelegate onAuthenticationFailedDelegate;
onAuthenticationFailedDelegate.method_ptr = ldftn(OnAuthenticationFailed);
onAuthenticationFailedDelegate.method = ldftn(OnAuthenticationFailed);
onAuthenticationFailedDelegate.m_target = this;
this.StartNegotiation();
}
// Token: 0x0600999C RID: 39324 RVA: 0x001F5CD4 File Offset: 0x001F3ED4
[Token(Token = "0x600999C")]
[Address(RVA = "0x627FB0", Offset = "0x626FB0", VA = "0x180627FB0")]
private void OnAuthenticationFailed(IAuthenticationProvider provider, string reason)
{
ILogger logger = HTTPManager.Logger;
string text = "OnAuthenticationFailed: " + reason;
IAuthenticationProvider authenticationProvider = this.<AuthenticationProvider>k__BackingField;
OnAuthenticationSuccededDelegate onAuthenticationSuccededDelegate;
onAuthenticationSuccededDelegate.method_ptr = ldftn(OnAuthenticationSucceded);
onAuthenticationSuccededDelegate.method = ldftn(OnAuthenticationSucceded);
onAuthenticationSuccededDelegate.m_target = this;
IAuthenticationProvider authenticationProvider2 = this.<AuthenticationProvider>k__BackingField;
OnAuthenticationFailedDelegate onAuthenticationFailedDelegate;
onAuthenticationFailedDelegate.method_ptr = ldftn(OnAuthenticationFailed);
onAuthenticationFailedDelegate.method = ldftn(OnAuthenticationFailed);
onAuthenticationFailedDelegate.m_target = this;
this.SetState(ConnectionStates.Closed, reason);
}
// Token: 0x0600999D RID: 39325 RVA: 0x001F5D58 File Offset: 0x001F3F58
[Token(Token = "0x600999D")]
[Address(RVA = "0x629F70", Offset = "0x628F70", VA = "0x180629F70")]
private void StartNegotiation()
{
ILogger logger = HTTPManager.Logger;
if (this.<State>k__BackingField != ConnectionStates.CloseInitiated)
{
if (!this.<Options>k__BackingField.<SkipNegotiation>k__BackingField)
{
int num = 0;
this.SetState(ConnectionStates.Negotiating, num);
UriBuilder uriBuilder = new UriBuilder(this.<Uri>k__BackingField);
if (!uriBuilder._path.EndsWith("/"))
{
string text = uriBuilder._path + "/";
uriBuilder.Path = text;
}
string text2 = uriBuilder._path + "negotiate";
uriBuilder.Path = text2;
Uri uri = uriBuilder.Uri;
Action<NEBIGEDJGPP, HOOILIHKMEG> action = new Action(this.OnNegotiationRequestFinished);
int num2 = 0;
if (this.<AuthenticationProvider>k__BackingField != 0 && num2 < uri)
{
num2 += num2;
num2++;
}
NEBIGEDJGPP nebigedjgpp;
nebigedjgpp.GDOIHJPIPBM();
return;
}
ILogger logger2 = HTTPManager.Logger;
this.ConnectImpl();
}
int num3 = 0;
this.SetState(ConnectionStates.Closed, num3);
throw new NullReferenceException();
}
// Token: 0x0600999E RID: 39326 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600999E")]
[Address(RVA = "0x627A10", Offset = "0x626A10", VA = "0x180627A10")]
private void ConnectImpl()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600999F RID: 39327 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600999F")]
[Address(RVA = "0x627EC0", Offset = "0x626EC0", VA = "0x180627EC0")]
private bool IsTransportSupported(string transportName)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060099A0 RID: 39328 RVA: 0x001F5E60 File Offset: 0x001F4060
[Token(Token = "0x60099A0")]
[Address(RVA = "0x628910", Offset = "0x627910", VA = "0x180628910")]
private void OnNegotiationRequestFinished(NEBIGEDJGPP req, HOOILIHKMEG resp)
{
while (this.<State>k__BackingField != ConnectionStates.CloseInitiated)
{
string text = req.GLGCGFDLEJE();
if (text == 0)
{
if (!resp.HIOBKPKOMLL)
{
int num = resp.LLODNIOIDKE;
string text2 = resp.DFPPNHINEFO;
string text3 = resp.DKPCLPHKFDI;
int num2;
string text4 = string.Format("Negotiation Request Finished Successfully, but the server sent an error. Status Code: {0}-{1} Message: {2}", num2, text2, text3);
}
ILogger logger = HTTPManager.Logger;
string text5 = resp.DKPCLPHKFDI;
string text6 = "Negotiation Request Finished Successfully! Response: " + text5;
int num3 = 0;
NegotiationResult negotiationResult = NegotiationResult.Parse(resp.DKPCLPHKFDI, num3, this);
this.<NegotiationResult>k__BackingField = negotiationResult;
if (negotiationResult == 0)
{
continue;
}
Uri <Url>k__BackingField = this.<NegotiationResult>k__BackingField.<Url>k__BackingField;
int num4 = 0;
if (!(<Url>k__BackingField != num4))
{
this.ConnectImpl();
}
int num5 = 0;
this.SetState(ConnectionStates.Redirected, num5);
int num6 = this.<RedirectCount>k__BackingField;
num6++;
this.<RedirectCount>k__BackingField = num6;
HubOptions hubOptions = this.<Options>k__BackingField;
int <MaxRedirects>k__BackingField = hubOptions.<MaxRedirects>k__BackingField;
if (num6 < <MaxRedirects>k__BackingField)
{
Uri uri = this.<Uri>k__BackingField;
NegotiationResult negotiationResult2 = this.<NegotiationResult>k__BackingField;
Uri <Url>k__BackingField2 = negotiationResult2.<Url>k__BackingField;
this.<Uri>k__BackingField = <Url>k__BackingField2;
if (!string.IsNullOrEmpty(negotiationResult2.<AccessToken>k__BackingField))
{
string <AccessToken>k__BackingField = this.<NegotiationResult>k__BackingField.<AccessToken>k__BackingField;
BearerTokenAuthProvider bearerTokenAuthProvider;
bearerTokenAuthProvider.StartAuthentication();
bearerTokenAuthProvider.accessToken = <AccessToken>k__BackingField;
this.<AuthenticationProvider>k__BackingField = bearerTokenAuthProvider;
}
if (this.OnRedirected != (ulong)0L)
{
Action<HubConnection, Uri, Uri> onRedirected = this.OnRedirected;
Uri uri2 = this.<Uri>k__BackingField;
onRedirected(this, uri, uri2);
ILogger logger2 = HTTPManager.Logger;
}
this.StartConnect();
}
string text7 = string.Format("MaxRedirects ({0:N0}) reached!", hubOptions);
}
if ("Negotiation Request: " + text != 0)
{
break;
}
return;
}
int num7 = 0;
this.SetState(ConnectionStates.Closed, num7);
}
// Token: 0x060099A1 RID: 39329 RVA: 0x001F6018 File Offset: 0x001F4218
[Token(Token = "0x60099A1")]
[Address(RVA = "0x629BF0", Offset = "0x628BF0", VA = "0x180629BF0")]
public void StartClose()
{
ILogger logger = HTTPManager.Logger;
int num = 0;
this.SetState(ConnectionStates.CloseInitiated, num);
if (this.<Transport>k__BackingField != 0)
{
}
}
// Token: 0x060099A2 RID: 39330 RVA: 0x001F6048 File Offset: 0x001F4248
[Token(Token = "0x60099A2")]
[Address(RVA = "0x21BF840", Offset = "0x21BE840", VA = "0x1821BF840")]
public IFuture<StreamItemContainer<TResult>> Stream<TResult>(string target, params object[] args)
{
Action<Message> action;
ulong num2;
long num = this.InvokeImp(target, args, action, num2 != 0UL);
throw new NullReferenceException();
}
// Token: 0x060099A3 RID: 39331 RVA: 0x001F6068 File Offset: 0x001F4268
[Token(Token = "0x60099A3")]
[Address(RVA = "0x25F7C60", Offset = "0x25F6C60", VA = "0x1825F7C60")]
public void CancelStream<T>(StreamItemContainer<T> container)
{
container.IsCanceled = true;
}
// Token: 0x060099A4 RID: 39332 RVA: 0x001F6088 File Offset: 0x001F4288
[Token(Token = "0x60099A4")]
[Address(RVA = "0x21BF710", Offset = "0x21BE710", VA = "0x1821BF710")]
public IFuture<TResult> Invoke<TResult>(string target, params object[] args)
{
Action<Message> action;
ulong num2;
long num = this.InvokeImp(target, args, action, num2 != 0UL);
throw new NullReferenceException();
}
// Token: 0x060099A5 RID: 39333 RVA: 0x001F60A8 File Offset: 0x001F42A8
[Token(Token = "0x60099A5")]
[Address(RVA = "0x6290E0", Offset = "0x6280E0", VA = "0x1806290E0")]
public IFuture<bool> Send(string target, params object[] args)
{
Future<bool> future4 = new Future();
Future<bool> future = future4;
Action<Message> action = delegate(Message message)
{
int num = 0;
Future<bool> future3 = future;
Exception ex = new Exception(num);
future3.Fail(ex);
};
if (this.<State>k__BackingField == ConnectionStates.Connected && action != 0)
{
Dictionary<long, Action<Message>> dictionary = this.invocations;
throw new NullReferenceException();
}
Future<bool> future2 = future;
throw new NullReferenceException();
}
// Token: 0x060099A6 RID: 39334 RVA: 0x001F6104 File Offset: 0x001F4304
[Token(Token = "0x60099A6")]
[Address(RVA = "0x627D60", Offset = "0x626D60", VA = "0x180627D60")]
private long InvokeImp(string target, object[] args, Action<Message> callback, bool isStreamingInvocation = false)
{
if (this.<State>k__BackingField == ConnectionStates.Connected && callback != 0)
{
Dictionary<long, Action<Message>> dictionary = this.invocations;
throw new NullReferenceException();
}
throw new NullReferenceException();
}
// Token: 0x060099A7 RID: 39335 RVA: 0x001F6138 File Offset: 0x001F4338
[Token(Token = "0x60099A7")]
[Address(RVA = "0x628FA0", Offset = "0x627FA0", VA = "0x180628FA0")]
private void SendMessage(Message message)
{
IProtocol protocol = this.<Protocol>k__BackingField;
int num = 0;
num += num;
num++;
bool nonblocking = message.nonblocking;
object[] arguments = message.arguments;
object result = message.result;
ITransport transport = this.<Transport>k__BackingField;
DateTime utcNow = DateTime.UtcNow;
this.lastMessageSent = utcNow;
}
// Token: 0x060099A8 RID: 39336 RVA: 0x001F618C File Offset: 0x001F438C
[Token(Token = "0x60099A8")]
[Address(RVA = "0x628CE0", Offset = "0x627CE0", VA = "0x180628CE0")]
public void On(string methodName, Action callback)
{
Action<object[]> action = delegate(object[] args)
{
callback();
};
Dictionary<string, Subscription> dictionary = this.subscriptions;
bool flag;
if (!flag)
{
Dictionary<string, Subscription> dictionary2 = this.subscriptions;
List<CallbackDescriptor> list = new List(1);
Subscription subscription;
subscription.callbacks = list;
throw new NullReferenceException();
}
}
// Token: 0x060099A9 RID: 39337 RVA: 0x001F61E4 File Offset: 0x001F43E4
[Token(Token = "0x60099A9")]
[Address(RVA = "0x25F83E0", Offset = "0x25F73E0", VA = "0x1825F83E0")]
public void On<T1>(string methodName, Action<T1> callback)
{
Type[] array = new Type[1];
Type typeFromHandle = typeof(Type);
if (typeFromHandle != 0)
{
}
array[0] = typeFromHandle;
Action<object[]> action;
this.On(methodName, array, action);
}
// Token: 0x060099AA RID: 39338 RVA: 0x001F6220 File Offset: 0x001F4420
[Token(Token = "0x60099AA")]
[Address(RVA = "0x25F8200", Offset = "0x25F7200", VA = "0x1825F8200")]
public void On<T1, T2>(string methodName, Action<T1, T2> callback)
{
Type[] array = new Type[2];
Type typeFromHandle = typeof(Type);
if (typeFromHandle != 0)
{
}
array[0] = typeFromHandle;
Type type;
if (type != 0)
{
}
array[1] = type;
Action<object[]> action;
this.On(methodName, array, action);
}
// Token: 0x060099AB RID: 39339 RVA: 0x001F6268 File Offset: 0x001F4468
[Token(Token = "0x60099AB")]
[Address(RVA = "0x25F7FC0", Offset = "0x25F6FC0", VA = "0x1825F7FC0")]
public void On<T1, T2, T3>(string methodName, Action<T1, T2, T3> callback)
{
Type[] array = new Type[3];
Type typeFromHandle = typeof(Type);
if (typeFromHandle != 0)
{
}
array[0] = typeFromHandle;
Type type;
if (type != 0)
{
}
array[1] = type;
Type type2;
if (type2 != 0)
{
}
array[2] = type2;
Action<object[]> action;
this.On(methodName, array, action);
}
// Token: 0x060099AC RID: 39340 RVA: 0x001F62BC File Offset: 0x001F44BC
[Token(Token = "0x60099AC")]
[Address(RVA = "0x25F7D20", Offset = "0x25F6D20", VA = "0x1825F7D20")]
public void On<T1, T2, T3, T4>(string methodName, Action<T1, T2, T3, T4> callback)
{
Type[] array = new Type[4];
Type typeFromHandle = typeof(Type);
if (typeFromHandle != 0)
{
}
array[0] = typeFromHandle;
Type type;
if (type != 0)
{
}
array[1] = type;
Type type2;
if (type2 != 0)
{
}
array[2] = type2;
Type type3;
if (type3 != 0)
{
}
array[3] = type3;
Action<object[]> action;
this.On(methodName, array, action);
}
// Token: 0x060099AD RID: 39341 RVA: 0x001F6320 File Offset: 0x001F4520
[Token(Token = "0x60099AD")]
[Address(RVA = "0x628E70", Offset = "0x627E70", VA = "0x180628E70")]
public void On(string methodName, Type[] paramTypes, Action<object[]> callback)
{
Dictionary<string, Subscription> dictionary = this.subscriptions;
bool flag;
if (!flag)
{
Dictionary<string, Subscription> dictionary2 = this.subscriptions;
List<CallbackDescriptor> list = new List(1);
Subscription subscription;
subscription.callbacks = list;
throw new NullReferenceException();
}
}
// Token: 0x060099AE RID: 39342 RVA: 0x001F635C File Offset: 0x001F455C
[Token(Token = "0x60099AE")]
[Address(RVA = "0x628210", Offset = "0x627210", VA = "0x180628210")]
internal void OnMessages(List<Message> messages)
{
ThrowHelper.ThrowArgumentOutOfRangeException();
bool flag;
if (this.OnMessage == 0 || !flag)
{
}
ILogger logger = HTTPManager.Logger;
int num = 0;
if (logger <= (ulong)6L)
{
Dictionary<string, Subscription> dictionary = this.subscriptions;
bool flag2;
if (flag2 && num < (flag2 ? 1 : 0))
{
ThrowHelper.ThrowArgumentOutOfRangeException();
num += 2;
num += num;
IProtocol protocol = this.<Protocol>k__BackingField;
ILogger logger2 = HTTPManager.Logger;
ILogger logger3 = HTTPManager.Logger;
num++;
bool flag3;
if (flag3)
{
Dictionary<long, Action<Message>> dictionary2 = this.invocations;
bool flag4;
if (flag4)
{
ILogger logger4 = HTTPManager.Logger;
bool flag5;
if (flag5)
{
Dictionary<long, Action<Message>> dictionary3 = this.invocations;
bool flag6;
if (flag6)
{
ILogger logger5 = HTTPManager.Logger;
}
Dictionary<long, Action<Message>> dictionary4 = this.invocations;
}
}
}
}
}
}
// Token: 0x060099AF RID: 39343 RVA: 0x001F6434 File Offset: 0x001F4634
[Token(Token = "0x60099AF")]
[Address(RVA = "0x62A240", Offset = "0x629240", VA = "0x18062A240")]
private void Transport_OnStateChanged(TransportStates oldState, TransportStates newState)
{
ILogger logger = HTTPManager.Logger;
ILogger logger2 = logger;
if (logger != 0)
{
if (logger != 0)
{
if (logger == 0)
{
ITransport transport = this.<Transport>k__BackingField;
goto IL_2B;
}
if (logger2 == (ulong)1L)
{
}
}
return;
}
IL_2B:
throw new NullReferenceException();
}
// Token: 0x060099B0 RID: 39344 RVA: 0x001F6474 File Offset: 0x001F4674
[Token(Token = "0x60099B0")]
[Address(RVA = "0x6292B0", Offset = "0x6282B0", VA = "0x1806292B0")]
private void SetState(ConnectionStates state, [Optional] string errorReason)
{
ILogger logger = HTTPManager.Logger;
string[] array = new string[7];
if ("SetState - from State: '" != 0)
{
}
array[0] = "SetState - from State: '";
ConnectionStates connectionStates;
int num = connectionStates.GetHashCode();
if (num != 0)
{
}
array[1] = num;
if ("' to State: '" != 0)
{
}
array[2] = "' to State: '";
int num2;
num = num2;
if (num != 0)
{
}
array[3] = num;
if ("' errorReason: '" != 0)
{
}
array[4] = "' errorReason: '";
if (errorReason != 0)
{
}
array[5] = errorReason;
if ("'" != 0)
{
}
array[6] = "'";
string text = string.Concat(array);
ILogger logger2 = HTTPManager.Logger;
string[] array2 = new string[5];
if ("SetState - from State: '" != 0)
{
}
array2[0] = "SetState - from State: '";
ConnectionStates connectionStates2;
int num3 = connectionStates2.GetHashCode();
if (num3 != 0)
{
}
array2[1] = num3;
if ("' to State: '" != 0)
{
}
array2[2] = "' to State: '";
int num4;
num3 = num4;
if (num3 != 0)
{
}
array2[3] = num3;
if ("'" != 0)
{
}
array2[4] = "'";
string text2 = string.Concat(array2);
if (this.<State>k__BackingField != text2)
{
this.<State>k__BackingField = text2;
if (text2 <= (ulong)6L)
{
Action<HubConnection> onConnected = this.OnConnected;
if (onConnected != 0)
{
onConnected(this);
}
ILogger logger3 = HTTPManager.Logger;
HTTPManager.Heartbeats.Subscribe(this);
DateTime utcNow = DateTime.UtcNow;
this.lastMessageSent = utcNow;
}
}
}
// Token: 0x060099B1 RID: 39345 RVA: 0x001F6658 File Offset: 0x001F4858
[Token(Token = "0x60099B1")]
[Address(RVA = "0x627860", Offset = "0x626860", VA = "0x180627860", Slot = "4")]
void IHeartbeat.OnHeartbeatUpdate(TimeSpan dif)
{
if (this.<State>k__BackingField == ConnectionStates.Connected)
{
TimeSpan <PingInterval>k__BackingField = this.<Options>k__BackingField.<PingInterval>k__BackingField;
TimeSpan zero = TimeSpan.Zero;
if (<PingInterval>k__BackingField != zero)
{
DateTime utcNow = DateTime.UtcNow;
DateTime dateTime = this.lastMessageSent;
TimeSpan timeSpan = utcNow - dateTime;
TimeSpan <PingInterval>k__BackingField2 = this.<Options>k__BackingField.<PingInterval>k__BackingField;
if (timeSpan >= <PingInterval>k__BackingField2)
{
}
}
}
}
// Token: 0x040067E3 RID: 26595
[Token(Token = "0x40067E3")]
public static readonly object[] EmptyArgs = new object[0];
// Token: 0x040067F1 RID: 26609
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
[Token(Token = "0x40067F1")]
private long lastInvocationId;
// Token: 0x040067F2 RID: 26610
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
[Token(Token = "0x40067F2")]
private Dictionary<long, Action<Message>> invocations;
// Token: 0x040067F3 RID: 26611
[global::Cpp2IlInjected.FieldOffset(Offset = "0x88")]
[Token(Token = "0x40067F3")]
private Dictionary<string, Subscription> subscriptions;
// Token: 0x040067F4 RID: 26612
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
[Token(Token = "0x40067F4")]
private DateTime lastMessageSent;
}
}