refactor!: remove NetworkChannel and MultiplexTransportAdapter#1133
refactor!: remove NetworkChannel and MultiplexTransportAdapter#1133
Conversation
| /// <summary> | ||
| /// A network transport | ||
| /// </summary> | ||
| public abstract class NetworkTransport : MonoBehaviour |
There was a problem hiding this comment.
there are lots of API breaking changes (for good) in this file. in fact, these changes are influencing changes in other places as well.
There was a problem hiding this comment.
I assume you and @andrews-unity are coordinating since he's got his transport refactor coming
There was a problem hiding this comment.
yep, we had a quick chat about this and he'll also review this PR too.
| } | ||
|
|
||
| public override unsafe void Send(ulong clientId, ArraySegment<byte> data, NetworkChannel networkChannel) | ||
| public override unsafe void Send(ulong clientId, ArraySegment<byte> data, NetworkDelivery networkDelivery) |
There was a problem hiding this comment.
changes in this file are actually just some temporary fixes. I reckon we're going to have a much better UTPTransport implementation soon :)
There was a problem hiding this comment.
(for instance, reading/writing channel IDs can go away but I just wanted to leave "proper" UTPTransport implementation for later, for a separate PR)
|
|
||
| var writer = new DataStreamWriter(data.Count + 1 + 4, Allocator.Temp); | ||
| writer.WriteByte((byte)networkChannel); | ||
| writer.WriteByte((byte)networkDelivery); |
There was a problem hiding this comment.
So, do we actually need to send the network delivery? I was assuming before we sent the channel so that we could on the receiving end route to the right channel, but if we don't do that... (or maybe I don't understand what this is for)
There was a problem hiding this comment.
no, you're right. we don't need this and channel ID at all. I wanted to keep better UTPTransport implementation for later, see my comments above.
There was a problem hiding this comment.
hey @andrews-unity, if you want me to kill this in this PR, I can do that here even before we make UTPTransport great again :)
There was a problem hiding this comment.
Duh, we have to also delete the reading of it in Execute and ServerUpdateJob
…rkVariable changable)
com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Transports/MultiplexTransportAdapter.cs
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Messaging/MessageQueue/MessageQueueHistoryFrame.cs
Show resolved
Hide resolved
…nsform * develop: fix: add `link.xml` to prevent IL2CPP stripping `Unity.PerformanceTesting` (#1172) chore: add boilerplate for `ClientNetworkTransform` sample (#1168) chore: remove `ClientNetworkVariable` (#1167) chore: Disable test while we reevaluate the assumption that INetworkM… (#1163) docs: rename Manual.md to Index.md Only track one metric for scene sync and do not report scene name (#1159) test: create job definitions for mobile build and test (#1152) test: make test runner scene ignored by default for BaseMultiInstanceTest (#1154) fix: remove left-over reference to SyncTransform (#1155) chore: remove unused SyncTransform.cs (#1153) chore!: remove NetworkNavMeshAgent (#1150) fix: NetworkObject parenting support in scene transitioning (#1148) chore!: rename Prototyping asmdef to Components (#1145) feat: add bootstrap sample to package (#1140) chore: remove `--yamato` param from `standards.py` (#1144) fix: MTT-504 connection approval messages and comparing networkconfig (#1138) refactor!: remove NetworkChannel and MultiplexTransportAdapter (#1133) # Conflicts: # com.unity.netcode.gameobjects/Components/Interpolator.meta # com.unity.netcode.gameobjects/Components/Interpolator/BufferedLinearInterpolator.cs # com.unity.netcode.gameobjects/Components/Interpolator/BufferedLinearInterpolator.cs.meta # testproject/Assets/Prefabs/PlayerCube.prefab
…-Technologies#1133) * cleanup NetworkTransport API * polish NetworkTransport API * port UNetTransport * kill MultiplexTransportAdapter * kill TransportChannel * NetworkVariableChannel -> Delivery * update IInternalMessageHandler interface * kill NetworkChannel around the codebase * fix MessageQueueContainer * update NetworkVariableBase constructor (make NetworkDelivery of NetworkVariable changable) * minor grammar fix * revert to NetworkVariable.Delivery being an internal const * remove channels from UTPTransport * `./standards.py --fix`
FYI @Cosmin-B