Files
2026-06-04 11:42:34 +02:00

78 lines
2.3 KiB
C#

using System;
namespace UnityEngine.Networking
{
// Token: 0x02000015 RID: 21
internal class ULocalConnectionToServer : NetworkConnection
{
// Token: 0x06000086 RID: 134 RVA: 0x00007CA5 File Offset: 0x00005EA5
public ULocalConnectionToServer(NetworkServer localServer)
{
this.address = "localServer";
this.m_LocalServer = localServer;
}
// Token: 0x06000087 RID: 135 RVA: 0x00007CC0 File Offset: 0x00005EC0
public override bool Send(short msgType, MessageBase msg)
{
return this.m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, 0);
}
// Token: 0x06000088 RID: 136 RVA: 0x00007CE4 File Offset: 0x00005EE4
public override bool SendUnreliable(short msgType, MessageBase msg)
{
return this.m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, 1);
}
// Token: 0x06000089 RID: 137 RVA: 0x00007D08 File Offset: 0x00005F08
public override bool SendByChannel(short msgType, MessageBase msg, int channelId)
{
return this.m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, channelId);
}
// Token: 0x0600008A RID: 138 RVA: 0x00007D2C File Offset: 0x00005F2C
public override bool SendBytes(byte[] bytes, int numBytes, int channelId)
{
bool flag;
if (numBytes <= 0)
{
if (LogFilter.logError)
{
Debug.LogError("LocalConnection:SendBytes cannot send zero bytes");
}
flag = false;
}
else
{
flag = this.m_LocalServer.InvokeBytes(this, bytes, numBytes, channelId);
}
return flag;
}
// Token: 0x0600008B RID: 139 RVA: 0x00007D78 File Offset: 0x00005F78
public override bool SendWriter(NetworkWriter writer, int channelId)
{
return this.m_LocalServer.InvokeBytes(this, writer.AsArray(), (int)((short)writer.AsArray().Length), channelId);
}
// Token: 0x0600008C RID: 140 RVA: 0x00007DA9 File Offset: 0x00005FA9
public override void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond)
{
numMsgs = 0;
numBufferedMsgs = 0;
numBytes = 0;
lastBufferedPerSecond = 0;
}
// Token: 0x0600008D RID: 141 RVA: 0x00007DB9 File Offset: 0x00005FB9
public override void GetStatsIn(out int numMsgs, out int numBytes)
{
numMsgs = 0;
numBytes = 0;
}
// Token: 0x0400005B RID: 91
private NetworkServer m_LocalServer;
}
}