using System; using System.Net; using System.Net.Sockets; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using UnityEngine.Internal; using UnityEngine.Networking.Types; using UnityEngine.Scripting; namespace UnityEngine.Networking { // Token: 0x020002C6 RID: 710 public sealed class NetworkTransport { // Token: 0x06002EDB RID: 11995 RVA: 0x000444F0 File Offset: 0x000426F0 private NetworkTransport() { } // Token: 0x06002EDC RID: 11996 RVA: 0x000444FC File Offset: 0x000426FC internal static bool DoesEndPointUsePlatformProtocols(EndPoint endPoint) { if (endPoint.GetType().FullName == "UnityEngine.PS4.SceEndPoint" || endPoint.GetType().FullName == "UnityEngine.PSVita.SceEndPoint") { SocketAddress socketAddress = endPoint.Serialize(); if (socketAddress[8] != 0 || socketAddress[9] != 0) { return true; } } return false; } // Token: 0x06002EDD RID: 11997 RVA: 0x00044570 File Offset: 0x00042770 public static int ConnectEndPoint(int hostId, EndPoint endPoint, int exceptionConnectionId, out byte error) { error = 0; byte[] array = new byte[] { 95, 36, 19, 246 }; if (endPoint == null) { throw new NullReferenceException("Null EndPoint provided"); } if (endPoint.GetType().FullName != "UnityEngine.XboxOne.XboxOneEndPoint" && endPoint.GetType().FullName != "UnityEngine.PS4.SceEndPoint" && endPoint.GetType().FullName != "UnityEngine.PSVita.SceEndPoint") { throw new ArgumentException("Endpoint of type XboxOneEndPoint or SceEndPoint required"); } int num; if (endPoint.GetType().FullName == "UnityEngine.XboxOne.XboxOneEndPoint") { if (endPoint.AddressFamily != AddressFamily.InterNetworkV6) { throw new ArgumentException("XboxOneEndPoint has an invalid family"); } SocketAddress socketAddress = endPoint.Serialize(); if (socketAddress.Size != 14) { throw new ArgumentException("XboxOneEndPoint has an invalid size"); } if (socketAddress[0] != 0 || socketAddress[1] != 0) { throw new ArgumentException("XboxOneEndPoint has an invalid family signature"); } if (socketAddress[2] != array[0] || socketAddress[3] != array[1] || socketAddress[4] != array[2] || socketAddress[5] != array[3]) { throw new ArgumentException("XboxOneEndPoint has an invalid signature"); } byte[] array2 = new byte[8]; for (int i = 0; i < array2.Length; i++) { array2[i] = socketAddress[6 + i]; } IntPtr intPtr = new IntPtr(BitConverter.ToInt64(array2, 0)); if (intPtr == IntPtr.Zero) { throw new ArgumentException("XboxOneEndPoint has an invalid SOCKET_STORAGE pointer"); } byte[] array3 = new byte[2]; Marshal.Copy(intPtr, array3, 0, array3.Length); AddressFamily addressFamily = (AddressFamily)(((int)array3[1] << 8) + (int)array3[0]); if (addressFamily != AddressFamily.InterNetworkV6) { throw new ArgumentException("XboxOneEndPoint has corrupt or invalid SOCKET_STORAGE pointer"); } num = NetworkTransport.Internal_ConnectEndPoint(hostId, intPtr, 128, exceptionConnectionId, out error); } else { SocketAddress socketAddress2 = endPoint.Serialize(); if (socketAddress2.Size != 16) { throw new ArgumentException("EndPoint has an invalid size"); } if ((int)socketAddress2[0] != socketAddress2.Size) { throw new ArgumentException("EndPoint has an invalid size value"); } if (socketAddress2[1] != 2) { throw new ArgumentException("EndPoint has an invalid family value"); } byte[] array4 = new byte[16]; for (int j = 0; j < array4.Length; j++) { array4[j] = socketAddress2[j]; } IntPtr intPtr2 = Marshal.AllocHGlobal(array4.Length); Marshal.Copy(array4, 0, intPtr2, array4.Length); int num2 = NetworkTransport.Internal_ConnectEndPoint(hostId, intPtr2, 16, exceptionConnectionId, out error); Marshal.FreeHGlobal(intPtr2); num = num2; } return num; } // Token: 0x06002EDE RID: 11998 RVA: 0x00044828 File Offset: 0x00042A28 public static void Init() { NetworkTransport.InitWithNoParameters(); } // Token: 0x06002EDF RID: 11999 RVA: 0x00044830 File Offset: 0x00042A30 public static void Init(GlobalConfig config) { NetworkTransport.InitWithParameters(new GlobalConfigInternal(config)); } // Token: 0x06002EE0 RID: 12000 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InitWithNoParameters(); // Token: 0x06002EE1 RID: 12001 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InitWithParameters(GlobalConfigInternal config); // Token: 0x06002EE2 RID: 12002 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern void Shutdown(); // Token: 0x06002EE3 RID: 12003 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern string GetAssetId(GameObject go); // Token: 0x06002EE4 RID: 12004 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern void AddSceneId(int id); // Token: 0x06002EE5 RID: 12005 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetNextSceneId(); // Token: 0x06002EE6 RID: 12006 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern void ConnectAsNetworkHost(int hostId, string address, int port, NetworkID network, SourceID source, NodeID node, out byte error); // Token: 0x06002EE7 RID: 12007 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern void DisconnectNetworkHost(int hostId, out byte error); // Token: 0x06002EE8 RID: 12008 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern NetworkEventType ReceiveRelayEventFromHost(int hostId, out byte error); // Token: 0x06002EE9 RID: 12009 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int ConnectToNetworkPeer(int hostId, string address, int port, int exceptionConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, int bytesPerSec, float bucketSizeFactor, out byte error); // Token: 0x06002EEA RID: 12010 RVA: 0x00044840 File Offset: 0x00042A40 public static int ConnectToNetworkPeer(int hostId, string address, int port, int exceptionConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, out byte error) { return NetworkTransport.ConnectToNetworkPeer(hostId, address, port, exceptionConnectionId, relaySlotId, network, source, node, 0, 0f, out error); } // Token: 0x06002EEB RID: 12011 [Obsolete("GetCurrentIncomingMessageAmount has been deprecated.")] [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetCurrentIncomingMessageAmount(); // Token: 0x06002EEC RID: 12012 [Obsolete("GetCurrentOutgoingMessageAmount has been deprecated.")] [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetCurrentOutgoingMessageAmount(); // Token: 0x06002EED RID: 12013 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetIncomingMessageQueueSize(int hostId, out byte error); // Token: 0x06002EEE RID: 12014 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingMessageQueueSize(int hostId, out byte error); // Token: 0x06002EEF RID: 12015 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetCurrentRTT(int hostId, int connectionId, out byte error); // Token: 0x06002EF0 RID: 12016 [Obsolete("GetCurrentRtt() has been deprecated.")] [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetCurrentRtt(int hostId, int connectionId, out byte error); // Token: 0x06002EF1 RID: 12017 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetIncomingPacketLossCount(int hostId, int connectionId, out byte error); // Token: 0x06002EF2 RID: 12018 [Obsolete("GetNetworkLostPacketNum() has been deprecated.")] [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetNetworkLostPacketNum(int hostId, int connectionId, out byte error); // Token: 0x06002EF3 RID: 12019 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetIncomingPacketCount(int hostId, int connectionId, out byte error); // Token: 0x06002EF4 RID: 12020 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingPacketNetworkLossPercent(int hostId, int connectionId, out byte error); // Token: 0x06002EF5 RID: 12021 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingPacketOverflowLossPercent(int hostId, int connectionId, out byte error); // Token: 0x06002EF6 RID: 12022 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetMaxAllowedBandwidth(int hostId, int connectionId, out byte error); // Token: 0x06002EF7 RID: 12023 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetAckBufferCount(int hostId, int connectionId, out byte error); // Token: 0x06002EF8 RID: 12024 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetIncomingPacketDropCountForAllHosts(); // Token: 0x06002EF9 RID: 12025 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetIncomingPacketCountForAllHosts(); // Token: 0x06002EFA RID: 12026 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingPacketCount(); // Token: 0x06002EFB RID: 12027 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingPacketCountForHost(int hostId, out byte error); // Token: 0x06002EFC RID: 12028 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingPacketCountForConnection(int hostId, int connectionId, out byte error); // Token: 0x06002EFD RID: 12029 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingMessageCount(); // Token: 0x06002EFE RID: 12030 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingMessageCountForHost(int hostId, out byte error); // Token: 0x06002EFF RID: 12031 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingMessageCountForConnection(int hostId, int connectionId, out byte error); // Token: 0x06002F00 RID: 12032 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingUserBytesCount(); // Token: 0x06002F01 RID: 12033 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingUserBytesCountForHost(int hostId, out byte error); // Token: 0x06002F02 RID: 12034 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingUserBytesCountForConnection(int hostId, int connectionId, out byte error); // Token: 0x06002F03 RID: 12035 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingSystemBytesCount(); // Token: 0x06002F04 RID: 12036 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingSystemBytesCountForHost(int hostId, out byte error); // Token: 0x06002F05 RID: 12037 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingSystemBytesCountForConnection(int hostId, int connectionId, out byte error); // Token: 0x06002F06 RID: 12038 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingFullBytesCount(); // Token: 0x06002F07 RID: 12039 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingFullBytesCountForHost(int hostId, out byte error); // Token: 0x06002F08 RID: 12040 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetOutgoingFullBytesCountForConnection(int hostId, int connectionId, out byte error); // Token: 0x06002F09 RID: 12041 [Obsolete("GetPacketSentRate has been deprecated.")] [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetPacketSentRate(int hostId, int connectionId, out byte error); // Token: 0x06002F0A RID: 12042 [Obsolete("GetPacketReceivedRate has been deprecated.")] [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetPacketReceivedRate(int hostId, int connectionId, out byte error); // Token: 0x06002F0B RID: 12043 [Obsolete("GetRemotePacketReceivedRate has been deprecated.")] [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetRemotePacketReceivedRate(int hostId, int connectionId, out byte error); // Token: 0x06002F0C RID: 12044 [Obsolete("GetNetIOTimeuS has been deprecated.")] [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetNetIOTimeuS(); // Token: 0x06002F0D RID: 12045 RVA: 0x00044870 File Offset: 0x00042A70 public static void GetConnectionInfo(int hostId, int connectionId, out string address, out int port, out NetworkID network, out NodeID dstNode, out byte error) { ulong num; ushort num2; address = NetworkTransport.GetConnectionInfo(hostId, connectionId, out port, out num, out num2, out error); network = (NetworkID)num; dstNode = (NodeID)num2; } // Token: 0x06002F0E RID: 12046 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern string GetConnectionInfo(int hostId, int connectionId, out int port, out ulong network, out ushort dstNode, out byte error); // Token: 0x06002F0F RID: 12047 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetNetworkTimestamp(); // Token: 0x06002F10 RID: 12048 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetRemoteDelayTimeMS(int hostId, int connectionId, int remoteTime, out byte error); // Token: 0x06002F11 RID: 12049 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern bool StartSendMulticast(int hostId, int channelId, byte[] buffer, int size, out byte error); // Token: 0x06002F12 RID: 12050 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern bool SendMulticast(int hostId, int connectionId, out byte error); // Token: 0x06002F13 RID: 12051 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern bool FinishSendMulticast(int hostId, out byte error); // Token: 0x06002F14 RID: 12052 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern int GetMaxPacketSize(); // Token: 0x06002F15 RID: 12053 RVA: 0x00044898 File Offset: 0x00042A98 private static void CheckTopology(HostTopology topology) { int maxPacketSize = NetworkTransport.GetMaxPacketSize(); if ((int)topology.DefaultConfig.PacketSize > maxPacketSize) { throw new ArgumentOutOfRangeException("Default config: packet size should be less than packet size defined in global config: " + maxPacketSize.ToString()); } for (int i = 0; i < topology.SpecialConnectionConfigs.Count; i++) { if ((int)topology.SpecialConnectionConfigs[i].PacketSize > maxPacketSize) { throw new ArgumentOutOfRangeException("Special config " + i.ToString() + ": packet size should be less than packet size defined in global config: " + maxPacketSize.ToString()); } } } // Token: 0x06002F16 RID: 12054 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern int AddWsHostWrapper(HostTopologyInternal topologyInt, string ip, int port); // Token: 0x06002F17 RID: 12055 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern int AddWsHostWrapperWithoutIp(HostTopologyInternal topologyInt, int port); // Token: 0x06002F18 RID: 12056 RVA: 0x00044940 File Offset: 0x00042B40 [ExcludeFromDocs] public static int AddWebsocketHost(HostTopology topology, int port) { string text = null; return NetworkTransport.AddWebsocketHost(topology, port, text); } // Token: 0x06002F19 RID: 12057 RVA: 0x00044960 File Offset: 0x00042B60 public static int AddWebsocketHost(HostTopology topology, int port, [DefaultValue("null")] string ip) { if (topology == null) { throw new NullReferenceException("topology is not defined"); } NetworkTransport.CheckTopology(topology); int num; if (ip == null) { num = NetworkTransport.AddWsHostWrapperWithoutIp(new HostTopologyInternal(topology), port); } else { num = NetworkTransport.AddWsHostWrapper(new HostTopologyInternal(topology), ip, port); } return num; } // Token: 0x06002F1A RID: 12058 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern int AddHostWrapper(HostTopologyInternal topologyInt, string ip, int port, int minTimeout, int maxTimeout); // Token: 0x06002F1B RID: 12059 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern int AddHostWrapperWithoutIp(HostTopologyInternal topologyInt, int port, int minTimeout, int maxTimeout); // Token: 0x06002F1C RID: 12060 RVA: 0x000449B4 File Offset: 0x00042BB4 [ExcludeFromDocs] public static int AddHost(HostTopology topology, int port) { string text = null; return NetworkTransport.AddHost(topology, port, text); } // Token: 0x06002F1D RID: 12061 RVA: 0x000449D4 File Offset: 0x00042BD4 [ExcludeFromDocs] public static int AddHost(HostTopology topology) { string text = null; int num = 0; return NetworkTransport.AddHost(topology, num, text); } // Token: 0x06002F1E RID: 12062 RVA: 0x000449F8 File Offset: 0x00042BF8 public static int AddHost(HostTopology topology, [DefaultValue("0")] int port, [DefaultValue("null")] string ip) { if (topology == null) { throw new NullReferenceException("topology is not defined"); } NetworkTransport.CheckTopology(topology); int num; if (ip == null) { num = NetworkTransport.AddHostWrapperWithoutIp(new HostTopologyInternal(topology), port, 0, 0); } else { num = NetworkTransport.AddHostWrapper(new HostTopologyInternal(topology), ip, port, 0, 0); } return num; } // Token: 0x06002F1F RID: 12063 RVA: 0x00044A50 File Offset: 0x00042C50 [ExcludeFromDocs] public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port) { string text = null; return NetworkTransport.AddHostWithSimulator(topology, minTimeout, maxTimeout, port, text); } // Token: 0x06002F20 RID: 12064 RVA: 0x00044A74 File Offset: 0x00042C74 [ExcludeFromDocs] public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout) { string text = null; int num = 0; return NetworkTransport.AddHostWithSimulator(topology, minTimeout, maxTimeout, num, text); } // Token: 0x06002F21 RID: 12065 RVA: 0x00044A98 File Offset: 0x00042C98 public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, [DefaultValue("0")] int port, [DefaultValue("null")] string ip) { if (topology == null) { throw new NullReferenceException("topology is not defined"); } int num; if (ip == null) { num = NetworkTransport.AddHostWrapperWithoutIp(new HostTopologyInternal(topology), port, minTimeout, maxTimeout); } else { num = NetworkTransport.AddHostWrapper(new HostTopologyInternal(topology), ip, port, minTimeout, maxTimeout); } return num; } // Token: 0x06002F22 RID: 12066 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern bool RemoveHost(int hostId); // Token: 0x17000AB5 RID: 2741 // (get) Token: 0x06002F23 RID: 12067 public static extern bool IsStarted { [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] get; } // Token: 0x06002F24 RID: 12068 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int Connect(int hostId, string address, int port, int exeptionConnectionId, out byte error); // Token: 0x06002F25 RID: 12069 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern int Internal_ConnectEndPoint(int hostId, IntPtr sockAddrStorage, int sockAddrStorageLen, int exceptionConnectionId, out byte error); // Token: 0x06002F26 RID: 12070 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int ConnectWithSimulator(int hostId, string address, int port, int exeptionConnectionId, out byte error, ConnectionSimulatorConfig conf); // Token: 0x06002F27 RID: 12071 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern bool Disconnect(int hostId, int connectionId, out byte error); // Token: 0x06002F28 RID: 12072 RVA: 0x00044AEC File Offset: 0x00042CEC public static bool Send(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error) { if (buffer == null) { throw new NullReferenceException("send buffer is not initialized"); } return NetworkTransport.SendWrapper(hostId, connectionId, channelId, buffer, size, out error); } // Token: 0x06002F29 RID: 12073 RVA: 0x00044B20 File Offset: 0x00042D20 public static bool QueueMessageForSending(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error) { if (buffer == null) { throw new NullReferenceException("send buffer is not initialized"); } return NetworkTransport.QueueMessageForSendingWrapper(hostId, connectionId, channelId, buffer, size, out error); } // Token: 0x06002F2A RID: 12074 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern bool SendQueuedMessages(int hostId, int connectionId, out byte error); // Token: 0x06002F2B RID: 12075 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool SendWrapper(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error); // Token: 0x06002F2C RID: 12076 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool QueueMessageForSendingWrapper(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error); // Token: 0x06002F2D RID: 12077 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool NotifyConnectionSendable(int hostId, int connectionId, out byte error); // Token: 0x06002F2E RID: 12078 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern NetworkEventType Receive(out int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error); // Token: 0x06002F2F RID: 12079 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern NetworkEventType ReceiveFromHost(int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error); // Token: 0x06002F30 RID: 12080 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes); // Token: 0x06002F31 RID: 12081 RVA: 0x00044B54 File Offset: 0x00042D54 public static bool StartBroadcastDiscovery(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error) { if (buffer != null) { if (buffer.Length < size) { throw new ArgumentOutOfRangeException(string.Concat(new object[] { "Size: ", size, " > buffer.Length ", buffer.Length })); } if (size == 0) { throw new ArgumentOutOfRangeException("Size is zero while buffer exists, please pass null and 0 as buffer and size parameters"); } } bool flag; if (buffer == null) { flag = NetworkTransport.StartBroadcastDiscoveryWithoutData(hostId, broadcastPort, key, version, subversion, timeout, out error); } else { flag = NetworkTransport.StartBroadcastDiscoveryWithData(hostId, broadcastPort, key, version, subversion, buffer, size, timeout, out error); } return flag; } // Token: 0x06002F32 RID: 12082 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool StartBroadcastDiscoveryWithoutData(int hostId, int broadcastPort, int key, int version, int subversion, int timeout, out byte error); // Token: 0x06002F33 RID: 12083 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool StartBroadcastDiscoveryWithData(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error); // Token: 0x06002F34 RID: 12084 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern void StopBroadcastDiscovery(); // Token: 0x06002F35 RID: 12085 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern bool IsBroadcastDiscoveryRunning(); // Token: 0x06002F36 RID: 12086 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern void SetBroadcastCredentials(int hostId, int key, int version, int subversion, out byte error); // Token: 0x06002F37 RID: 12087 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern string GetBroadcastConnectionInfo(int hostId, out int port, out byte error); // Token: 0x06002F38 RID: 12088 RVA: 0x00044BF8 File Offset: 0x00042DF8 public static void GetBroadcastConnectionInfo(int hostId, out string address, out int port, out byte error) { address = NetworkTransport.GetBroadcastConnectionInfo(hostId, out port, out error); } // Token: 0x06002F39 RID: 12089 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public static extern void GetBroadcastConnectionMessage(int hostId, byte[] buffer, int bufferSize, out int receivedSize, out byte error); } }