Files
2026-04-08 23:40:05 +02:00

1019 lines
32 KiB
C#

using System;
using System.Collections;
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: 0x02001300 RID: 4864
[Token(Token = "0x2001300")]
[StructLayout(3)]
public sealed class HubConnection : IHeartbeat
{
// Token: 0x170013D3 RID: 5075
// (get) Token: 0x060079C4 RID: 31172 RVA: 0x00194CD8 File Offset: 0x00192ED8
// (set) Token: 0x060079C5 RID: 31173 RVA: 0x00194CEC File Offset: 0x00192EEC
[Token(Token = "0x170013D3")]
public Uri Uri
{
[Token(Token = "0x60079C4")]
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
get;
[Token(Token = "0x60079C5")]
[Address(RVA = "0x3C39B0", Offset = "0x3C23B0", VA = "0x1803C39B0")]
private set;
}
// Token: 0x170013D4 RID: 5076
// (get) Token: 0x060079C6 RID: 31174 RVA: 0x00194D00 File Offset: 0x00192F00
// (set) Token: 0x060079C7 RID: 31175 RVA: 0x00194D14 File Offset: 0x00192F14
[Token(Token = "0x170013D4")]
public ConnectionStates State
{
[Token(Token = "0x60079C6")]
[Address(RVA = "0x3EE8D0", Offset = "0x3ED2D0", VA = "0x1803EE8D0")]
get;
[Token(Token = "0x60079C7")]
[Address(RVA = "0x4F8C20", Offset = "0x4F7620", VA = "0x1804F8C20")]
private set;
}
// Token: 0x170013D5 RID: 5077
// (get) Token: 0x060079C8 RID: 31176 RVA: 0x00194D28 File Offset: 0x00192F28
// (set) Token: 0x060079C9 RID: 31177 RVA: 0x00194D3C File Offset: 0x00192F3C
[Token(Token = "0x170013D5")]
public ITransport Transport
{
[Token(Token = "0x60079C8")]
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
get;
[Token(Token = "0x60079C9")]
[Address(RVA = "0x3C1260", Offset = "0x3BFC60", VA = "0x1803C1260")]
private set;
}
// Token: 0x170013D6 RID: 5078
// (get) Token: 0x060079CA RID: 31178 RVA: 0x00194D50 File Offset: 0x00192F50
// (set) Token: 0x060079CB RID: 31179 RVA: 0x00194D64 File Offset: 0x00192F64
[Token(Token = "0x170013D6")]
public IProtocol Protocol
{
[Token(Token = "0x60079CA")]
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
get;
[Token(Token = "0x60079CB")]
[Address(RVA = "0x3C1270", Offset = "0x3BFC70", VA = "0x1803C1270")]
private set;
}
// Token: 0x140000AE RID: 174
// (add) Token: 0x060079CC RID: 31180 RVA: 0x00194D78 File Offset: 0x00192F78
// (remove) Token: 0x060079CD RID: 31181 RVA: 0x00194DA0 File Offset: 0x00192FA0
[Token(Token = "0x140000AE")]
public event Action<HubConnection, Uri, Uri> OnRedirected
{
[Token(Token = "0x60079CC")]
[Address(RVA = "0x6EE880", Offset = "0x6ED280", VA = "0x1806EE880")]
[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 = "0x60079CD")]
[Address(RVA = "0x6EEBA0", Offset = "0x6ED5A0", VA = "0x1806EEBA0")]
[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: 0x140000AF RID: 175
// (add) Token: 0x060079CE RID: 31182 RVA: 0x00194DC8 File Offset: 0x00192FC8
// (remove) Token: 0x060079CF RID: 31183 RVA: 0x00194DF0 File Offset: 0x00192FF0
[Token(Token = "0x140000AF")]
public event Action<HubConnection> OnConnected
{
[Token(Token = "0x60079CE")]
[Address(RVA = "0x6EE6A0", Offset = "0x6ED0A0", VA = "0x1806EE6A0")]
[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 = "0x60079CF")]
[Address(RVA = "0x6EE9C0", Offset = "0x6ED3C0", VA = "0x1806EE9C0")]
[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: 0x140000B0 RID: 176
// (add) Token: 0x060079D0 RID: 31184 RVA: 0x00194E18 File Offset: 0x00193018
// (remove) Token: 0x060079D1 RID: 31185 RVA: 0x00194E40 File Offset: 0x00193040
[Token(Token = "0x140000B0")]
public event Action<HubConnection, string> OnError
{
[Token(Token = "0x60079D0")]
[Address(RVA = "0x6EE740", Offset = "0x6ED140", VA = "0x1806EE740")]
[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 = "0x60079D1")]
[Address(RVA = "0x6EEA60", Offset = "0x6ED460", VA = "0x1806EEA60")]
[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: 0x140000B1 RID: 177
// (add) Token: 0x060079D2 RID: 31186 RVA: 0x00194E68 File Offset: 0x00193068
// (remove) Token: 0x060079D3 RID: 31187 RVA: 0x00194E90 File Offset: 0x00193090
[Token(Token = "0x140000B1")]
public event Action<HubConnection> OnClosed
{
[Token(Token = "0x60079D2")]
[Address(RVA = "0x6EE600", Offset = "0x6ED000", VA = "0x1806EE600")]
[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 = "0x60079D3")]
[Address(RVA = "0x6EE920", Offset = "0x6ED320", VA = "0x1806EE920")]
[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: 0x140000B2 RID: 178
// (add) Token: 0x060079D4 RID: 31188 RVA: 0x00194EB8 File Offset: 0x001930B8
// (remove) Token: 0x060079D5 RID: 31189 RVA: 0x00194EE0 File Offset: 0x001930E0
[Token(Token = "0x140000B2")]
public event Func<HubConnection, Message, bool> OnMessage
{
[Token(Token = "0x60079D4")]
[Address(RVA = "0x6EE7E0", Offset = "0x6ED1E0", VA = "0x1806EE7E0")]
[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 = "0x60079D5")]
[Address(RVA = "0x6EEB00", Offset = "0x6ED500", VA = "0x1806EEB00")]
[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: 0x170013D7 RID: 5079
// (get) Token: 0x060079D6 RID: 31190 RVA: 0x00194F08 File Offset: 0x00193108
// (set) Token: 0x060079D7 RID: 31191 RVA: 0x00194F1C File Offset: 0x0019311C
[Token(Token = "0x170013D7")]
public IAuthenticationProvider AuthenticationProvider
{
[Token(Token = "0x60079D6")]
[Address(RVA = "0x4B81A0", Offset = "0x4B6BA0", VA = "0x1804B81A0")]
get;
[Token(Token = "0x60079D7")]
[Address(RVA = "0x3EDEB0", Offset = "0x3EC8B0", VA = "0x1803EDEB0")]
set;
}
// Token: 0x170013D8 RID: 5080
// (get) Token: 0x060079D8 RID: 31192 RVA: 0x00194F30 File Offset: 0x00193130
// (set) Token: 0x060079D9 RID: 31193 RVA: 0x00194F44 File Offset: 0x00193144
[Token(Token = "0x170013D8")]
public NegotiationResult NegotiationResult
{
[Token(Token = "0x60079D8")]
[Address(RVA = "0x3EDE90", Offset = "0x3EC890", VA = "0x1803EDE90")]
get;
[Token(Token = "0x60079D9")]
[Address(RVA = "0x3EDEC0", Offset = "0x3EC8C0", VA = "0x1803EDEC0")]
private set;
}
// Token: 0x170013D9 RID: 5081
// (get) Token: 0x060079DA RID: 31194 RVA: 0x00194F58 File Offset: 0x00193158
// (set) Token: 0x060079DB RID: 31195 RVA: 0x00194F6C File Offset: 0x0019316C
[Token(Token = "0x170013D9")]
public HubOptions Options
{
[Token(Token = "0x60079DA")]
[Address(RVA = "0x48F050", Offset = "0x48DA50", VA = "0x18048F050")]
get;
[Token(Token = "0x60079DB")]
[Address(RVA = "0x52F860", Offset = "0x52E260", VA = "0x18052F860")]
private set;
}
// Token: 0x170013DA RID: 5082
// (get) Token: 0x060079DC RID: 31196 RVA: 0x00194F80 File Offset: 0x00193180
// (set) Token: 0x060079DD RID: 31197 RVA: 0x00194F94 File Offset: 0x00193194
[Token(Token = "0x170013DA")]
public int RedirectCount
{
[Token(Token = "0x60079DC")]
[Address(RVA = "0x567E50", Offset = "0x566850", VA = "0x180567E50")]
get;
[Token(Token = "0x60079DD")]
[Address(RVA = "0x6D78D0", Offset = "0x6D62D0", VA = "0x1806D78D0")]
private set;
}
// Token: 0x060079DE RID: 31198 RVA: 0x00194FA8 File Offset: 0x001931A8
[Token(Token = "0x60079DE")]
[Address(RVA = "0x6EE340", Offset = "0x6ECD40", VA = "0x1806EE340")]
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: 0x060079DF RID: 31199 RVA: 0x00194FDC File Offset: 0x001931DC
[Token(Token = "0x60079DF")]
[Address(RVA = "0x6EE420", Offset = "0x6ECE20", VA = "0x1806EE420")]
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 = new DefaultAccessTokenAuthenticator(this);
this.AuthenticationProvider = defaultAccessTokenAuthenticator;
}
// Token: 0x060079E0 RID: 31200 RVA: 0x00195048 File Offset: 0x00193248
[Token(Token = "0x60079E0")]
[Address(RVA = "0x6EDB70", Offset = "0x6EC570", VA = "0x1806EDB70")]
public void StartConnect()
{
ConnectionStates connectionStates = this.<State>k__BackingField;
int num = 0;
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)
{
if (num < typeof(ILogger).TypeHandle)
{
num += num;
num++;
}
if (num != 0)
{
ILogger logger3 = HTTPManager.Logger;
int num2 = 0;
this.SetState(ConnectionStates.Authenticating, num2);
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: 0x060079E1 RID: 31201 RVA: 0x0019512C File Offset: 0x0019332C
[Token(Token = "0x60079E1")]
[Address(RVA = "0x6EBFB0", Offset = "0x6EA9B0", VA = "0x1806EBFB0")]
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: 0x060079E2 RID: 31202 RVA: 0x001951A0 File Offset: 0x001933A0
[Token(Token = "0x60079E2")]
[Address(RVA = "0x6EBE70", Offset = "0x6EA870", VA = "0x1806EBE70")]
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: 0x060079E3 RID: 31203 RVA: 0x00195224 File Offset: 0x00193424
[Token(Token = "0x60079E3")]
[Address(RVA = "0x6EDE80", Offset = "0x6EC880", VA = "0x1806EDE80")]
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;
IEnumerator enumerator = nebigedjgpp.GDOIHJPIPBM();
return;
}
ILogger logger2 = HTTPManager.Logger;
this.ConnectImpl();
}
int num3 = 0;
this.SetState(ConnectionStates.Closed, num3);
throw new NullReferenceException();
}
// Token: 0x060079E4 RID: 31204 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x60079E4")]
[Address(RVA = "0x6EB8D0", Offset = "0x6EA2D0", VA = "0x1806EB8D0")]
private void ConnectImpl()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060079E5 RID: 31205 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x60079E5")]
[Address(RVA = "0x6EBD80", Offset = "0x6EA780", VA = "0x1806EBD80")]
private bool IsTransportSupported(string transportName)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060079E6 RID: 31206 RVA: 0x00195324 File Offset: 0x00193524
[Token(Token = "0x60079E6")]
[Address(RVA = "0x6EC7D0", Offset = "0x6EB1D0", VA = "0x1806EC7D0")]
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))
{
BearerTokenAuthProvider bearerTokenAuthProvider = new BearerTokenAuthProvider(this.<NegotiationResult>k__BackingField.<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: 0x060079E7 RID: 31207 RVA: 0x001954D0 File Offset: 0x001936D0
[Token(Token = "0x60079E7")]
[Address(RVA = "0x6EDAB0", Offset = "0x6EC4B0", VA = "0x1806EDAB0")]
public void StartClose()
{
ILogger logger = HTTPManager.Logger;
int num = 0;
this.SetState(ConnectionStates.CloseInitiated, num);
if (this.<Transport>k__BackingField != 0)
{
}
}
// Token: 0x060079E8 RID: 31208 RVA: 0x00195500 File Offset: 0x00193700
[Token(Token = "0x60079E8")]
[Address(RVA = "0x1FA8300", Offset = "0x1FA6D00", VA = "0x181FA8300")]
public IFuture Stream<TResult>(string cpp2il__autoParamName__idx_0, object[] cpp2il__autoParamName__idx_1)
{
Action<Message> action;
ulong num2;
long num = this.InvokeImp(cpp2il__autoParamName__idx_0, cpp2il__autoParamName__idx_1, action, num2 != 0UL);
throw new NullReferenceException();
}
// Token: 0x060079E9 RID: 31209 RVA: 0x00195520 File Offset: 0x00193720
[Token(Token = "0x60079E9")]
[Address(RVA = "0x2042490", Offset = "0x2040E90", VA = "0x182042490")]
public void CancelStream<T>(StreamItemContainer cpp2il__autoParamName__idx_0)
{
long id = cpp2il__autoParamName__idx_0.id;
}
// Token: 0x060079EA RID: 31210 RVA: 0x00195540 File Offset: 0x00193740
[Token(Token = "0x60079EA")]
[Address(RVA = "0x1FA8040", Offset = "0x1FA6A40", VA = "0x181FA8040")]
public IFuture Invoke<TResult>(string cpp2il__autoParamName__idx_0, object[] cpp2il__autoParamName__idx_1)
{
Action<Message> action;
ulong num2;
long num = this.InvokeImp(cpp2il__autoParamName__idx_0, cpp2il__autoParamName__idx_1, action, num2 != 0UL);
throw new NullReferenceException();
}
// Token: 0x060079EB RID: 31211 RVA: 0x00195560 File Offset: 0x00193760
[Token(Token = "0x60079EB")]
[Address(RVA = "0x6ECFA0", Offset = "0x6EB9A0", VA = "0x1806ECFA0")]
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 num2 = 0;
Future<bool> future3 = future;
Exception ex = new Exception(num2);
future3.Fail(ex);
};
if (this.<State>k__BackingField == ConnectionStates.Connected && action != 0)
{
long num;
this.invocations.Add(num, action);
}
Future<bool> future2 = future;
throw new NullReferenceException();
}
// Token: 0x060079EC RID: 31212 RVA: 0x001955BC File Offset: 0x001937BC
[Token(Token = "0x60079EC")]
[Address(RVA = "0x6EBC20", Offset = "0x6EA620", VA = "0x1806EBC20")]
private long InvokeImp(string target, object[] args, Action<Message> callback, bool isStreamingInvocation = false)
{
if (this.<State>k__BackingField == ConnectionStates.Connected && callback != 0)
{
long num;
this.invocations.Add(num, callback);
}
throw new NullReferenceException();
}
// Token: 0x060079ED RID: 31213 RVA: 0x001955EC File Offset: 0x001937EC
[Token(Token = "0x60079ED")]
[Address(RVA = "0x6ECE60", Offset = "0x6EB860", VA = "0x1806ECE60")]
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: 0x060079EE RID: 31214 RVA: 0x00195640 File Offset: 0x00193840
[Token(Token = "0x60079EE")]
[Address(RVA = "0x6ECBA0", Offset = "0x6EB5A0", VA = "0x1806ECBA0")]
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;
dictionary2.Add(methodName, subscription);
}
}
// Token: 0x060079EF RID: 31215 RVA: 0x0019569C File Offset: 0x0019389C
[Token(Token = "0x60079EF")]
[Address(RVA = "0x2042CD0", Offset = "0x20416D0", VA = "0x182042CD0")]
public void On<T1>(string cpp2il__autoParamName__idx_0, Action cpp2il__autoParamName__idx_1)
{
Type[] array = new Type[1];
Type typeFromHandle = typeof(Type);
if (typeFromHandle != 0)
{
}
array[0] = typeFromHandle;
Action<object[]> action;
this.On(cpp2il__autoParamName__idx_0, array, action);
}
// Token: 0x060079F0 RID: 31216 RVA: 0x001956D8 File Offset: 0x001938D8
[Token(Token = "0x60079F0")]
[Address(RVA = "0x2042AF0", Offset = "0x20414F0", VA = "0x182042AF0")]
public void On<T1, T2>(string cpp2il__autoParamName__idx_0, Action cpp2il__autoParamName__idx_1)
{
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(cpp2il__autoParamName__idx_0, array, action);
}
// Token: 0x060079F1 RID: 31217 RVA: 0x00195720 File Offset: 0x00193920
[Token(Token = "0x60079F1")]
[Address(RVA = "0x20428B0", Offset = "0x20412B0", VA = "0x1820428B0")]
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: 0x060079F2 RID: 31218 RVA: 0x00195774 File Offset: 0x00193974
[Token(Token = "0x60079F2")]
[Address(RVA = "0x2042610", Offset = "0x2041010", VA = "0x182042610")]
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: 0x060079F3 RID: 31219 RVA: 0x001957D8 File Offset: 0x001939D8
[Token(Token = "0x60079F3")]
[Address(RVA = "0x6ECD30", Offset = "0x6EB730", VA = "0x1806ECD30")]
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;
dictionary2.Add(methodName, subscription);
}
}
// Token: 0x060079F4 RID: 31220 RVA: 0x00195818 File Offset: 0x00193A18
[Token(Token = "0x60079F4")]
[Address(RVA = "0x6EC0D0", Offset = "0x6EAAD0", VA = "0x1806EC0D0")]
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: 0x060079F5 RID: 31221 RVA: 0x001958F0 File Offset: 0x00193AF0
[Token(Token = "0x60079F5")]
[Address(RVA = "0x6EE150", Offset = "0x6ECB50", VA = "0x1806EE150")]
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: 0x060079F6 RID: 31222 RVA: 0x00195930 File Offset: 0x00193B30
[Token(Token = "0x60079F6")]
[Address(RVA = "0x6ED170", Offset = "0x6EBB70", VA = "0x1806ED170")]
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: 0x060079F7 RID: 31223 RVA: 0x00195B14 File Offset: 0x00193D14
[Token(Token = "0x60079F7")]
[Address(RVA = "0x6EB720", Offset = "0x6EA120", VA = "0x1806EB720", 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: 0x040057E5 RID: 22501
[Token(Token = "0x40057E5")]
public static readonly object[] EmptyArgs = new object[0];
// Token: 0x040057F3 RID: 22515
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
[Token(Token = "0x40057F3")]
private long lastInvocationId;
// Token: 0x040057F4 RID: 22516
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
[Token(Token = "0x40057F4")]
private Dictionary<long, Action<Message>> invocations;
// Token: 0x040057F5 RID: 22517
[global::Cpp2IlInjected.FieldOffset(Offset = "0x88")]
[Token(Token = "0x40057F5")]
private Dictionary<string, Subscription> subscriptions;
// Token: 0x040057F6 RID: 22518
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
[Token(Token = "0x40057F6")]
private DateTime lastMessageSent;
}
}