Skip to content

Commit 3fc7c6a

Browse files
committed
feat!: adding MaxPacketSize for Mirage v120
BREAKING CHANGE: requires upgrade to Mirage v120
1 parent 721318c commit 3fc7c6a

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

Assets/MultiplexSocket/Runtime/MultiplexSocketFactory.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Linq;
34
using Mirage.SocketLayer;
45
using UnityEngine;
56

@@ -13,6 +14,9 @@ public class MultiplexSocketFactory : SocketFactory
1314
[Header("Sockets to use in order of priority")]
1415
public List<SocketFactory> Factories;
1516

17+
// pick lowest size, so that mirage can be configured to work with any of them
18+
public override int MaxPacketSize => Factories.Min(x => x.MaxPacketSize);
19+
1620
public override ISocket CreateServerSocket()
1721
{
1822
ThrowIfNoFactories();

Assets/MultiplexSocket/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"description": "Multiplex allows a server to run multiple sockets at once, this allows clients from multiple platforms to connect to the same game server",
77
"author": "James Frowen",
88
"dependencies": {
9-
"com.miragenet.mirage": "114.1.0"
9+
"com.miragenet.mirage": "120.0.0"
1010
},
1111
"samples": []
12-
}
12+
}

Packages/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dependencies": {
3-
"com.miragenet.mirage": "114.1.0",
3+
"com.miragenet.mirage": "120.0.0",
44
"com.unity.collab-proxy": "1.2.16",
55
"com.unity.ide.rider": "1.1.4",
66
"com.unity.ide.vscode": "1.2.2",

Packages/packages-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "https://package.openupm.com"
99
},
1010
"com.miragenet.mirage": {
11-
"version": "114.1.0",
11+
"version": "120.0.0",
1212
"depth": 0,
1313
"source": "registry",
1414
"dependencies": {

0 commit comments

Comments
 (0)